Commit | Line | Data |
---|---|---|
ddccffcc | 1 | /* netisr.h 4.2 82/10/31 */ |
a9f97ede BJ |
2 | |
3 | /* | |
4 | * The networking code runs off software interrupts. | |
5 | * | |
6 | * You can switch into the network by doing splnet() and return by splx(). | |
7 | * The software interrupt level for the network is higher than the software | |
8 | * level for the clock (so you can enter the network in routines called | |
9 | * at timeout time). | |
10 | */ | |
ddccffcc BJ |
11 | #if sun |
12 | #include "../sun/sir.h" | |
13 | #define setsoftnet() siron(SIR_NET) | |
14 | #else | |
15 | /* #include "../vax/mtpr.h" */ | |
a9f97ede | 16 | #define setsoftnet() mtpr(SIRR, 12) |
ddccffcc | 17 | #endif |
a9f97ede BJ |
18 | |
19 | /* | |
20 | * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status | |
21 | * word which is used to de-multiplex a single software | |
22 | * interrupt used for scheduling the network code to calls | |
23 | * on the lowest level routine of each protocol. | |
24 | */ | |
25 | #define NETISR_RAW 0 /* same as AF_UNSPEC */ | |
26 | #define NETISR_IP 2 /* same as AF_INET */ | |
27 | #define NETISR_NS 6 /* same as AF_NS */ | |
28 | ||
29 | #define schednetisr(anisr) { netisr |= 1<<(anisr); setsoftnet(); } | |
30 | ||
31 | #ifndef LOCORE | |
32 | #ifdef KERNEL | |
33 | int netisr; /* scheduling bits for network */ | |
34 | #endif | |
35 | #endif |