Commit | Line | Data |
---|---|---|
cb1c44c2 | 1 | /* |
1810611d | 2 | * Copyright (c) 1980, 1986 Regents of the University of California. |
5b519e94 | 3 | * All rights reserved. |
cb1c44c2 | 4 | * |
5b519e94 KB |
5 | * Redistribution and use in source and binary forms are permitted |
6 | * provided that this notice is preserved and that due credit is given | |
7 | * to the University of California at Berkeley. The name of the University | |
8 | * may not be used to endorse or promote products derived from this | |
9 | * software without specific prior written permission. This software | |
10 | * is provided ``as is'' without express or implied warranty. | |
11 | * | |
12 | * @(#)netisr.h 7.3 (Berkeley) %G% | |
cb1c44c2 | 13 | */ |
a9f97ede BJ |
14 | |
15 | /* | |
16 | * The networking code runs off software interrupts. | |
17 | * | |
18 | * You can switch into the network by doing splnet() and return by splx(). | |
19 | * The software interrupt level for the network is higher than the software | |
20 | * level for the clock (so you can enter the network in routines called | |
21 | * at timeout time). | |
22 | */ | |
2e62d00d | 23 | #if defined(vax) || defined(tahoe) |
a9f97ede | 24 | #define setsoftnet() mtpr(SIRR, 12) |
ddccffcc | 25 | #endif |
a9f97ede BJ |
26 | |
27 | /* | |
28 | * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status | |
29 | * word which is used to de-multiplex a single software | |
30 | * interrupt used for scheduling the network code to calls | |
31 | * on the lowest level routine of each protocol. | |
32 | */ | |
33 | #define NETISR_RAW 0 /* same as AF_UNSPEC */ | |
34 | #define NETISR_IP 2 /* same as AF_INET */ | |
e3d5e8b3 | 35 | #define NETISR_IMP 3 /* same as AF_IMPLINK */ |
a9f97ede BJ |
36 | #define NETISR_NS 6 /* same as AF_NS */ |
37 | ||
38 | #define schednetisr(anisr) { netisr |= 1<<(anisr); setsoftnet(); } | |
39 | ||
40 | #ifndef LOCORE | |
41 | #ifdef KERNEL | |
42 | int netisr; /* scheduling bits for network */ | |
43 | #endif | |
44 | #endif |