diff options
Diffstat (limited to 'sys/i386/isa/ipl_funcs.c')
-rw-r--r-- | sys/i386/isa/ipl_funcs.c | 46 |
1 files changed, 16 insertions, 30 deletions
diff --git a/sys/i386/isa/ipl_funcs.c b/sys/i386/isa/ipl_funcs.c index 98a5412..359ef51 100644 --- a/sys/i386/isa/ipl_funcs.c +++ b/sys/i386/isa/ipl_funcs.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ipl_funcs.c,v 1.18 1999/05/06 22:13:53 peter Exp $ + * $Id: ipl_funcs.c,v 1.19 1999/05/09 23:29:56 peter Exp $ */ #include <sys/types.h> @@ -32,11 +32,11 @@ #include <machine/globals.h> #include <i386/isa/intr_machdep.h> -#ifndef SMP /* * The volatile bitmap variables must be set atomically. This normally * involves using a machine-dependent bit-set or `or' instruction. */ +#ifndef SMP #define DO_SETBITS(name, var, bits) \ void name(void) \ @@ -44,6 +44,18 @@ void name(void) \ setbits(var, bits); \ } +#else /* !SMP */ + +#define DO_SETBITS(name, var, bits) \ +void name(void) \ +{ \ + IFCPL_LOCK(); \ + setbits(var, bits); \ + IFCPL_UNLOCK(); \ +} + +#endif /* !SMP */ + DO_SETBITS(setdelayed, &ipending, loadandclear(&idelayed)) DO_SETBITS(setsoftast, &ipending, SWI_AST_PENDING) DO_SETBITS(setsoftcamnet,&ipending, SWI_CAMNET_PENDING) @@ -59,6 +71,8 @@ DO_SETBITS(schedsoftnet, &idelayed, SWI_NET_PENDING) DO_SETBITS(schedsofttty, &idelayed, SWI_TTY_PENDING) DO_SETBITS(schedsoftvm, &idelayed, SWI_VM_PENDING) +#ifndef SMP + unsigned softclockpending(void) { @@ -130,34 +144,6 @@ splq(intrmask_t mask) #endif /* SPL_DEBUG_POSTCODE */ -/* - * The volatile bitmap variables must be set atomically. This normally - * involves using a machine-dependent bit-set or `or' instruction. - */ - -#define DO_SETBITS(name, var, bits) \ -void name(void) \ -{ \ - IFCPL_LOCK(); \ - setbits(var, bits); \ - IFCPL_UNLOCK(); \ -} - -DO_SETBITS(setdelayed, &ipending, loadandclear(&idelayed)) -DO_SETBITS(setsoftast, &ipending, SWI_AST_PENDING) -DO_SETBITS(setsoftcamnet,&ipending, SWI_CAMNET_PENDING) -DO_SETBITS(setsoftcambio,&ipending, SWI_CAMBIO_PENDING) -DO_SETBITS(setsoftclock, &ipending, SWI_CLOCK_PENDING) -DO_SETBITS(setsoftnet, &ipending, SWI_NET_PENDING) -DO_SETBITS(setsofttty, &ipending, SWI_TTY_PENDING) -DO_SETBITS(setsoftvm, &ipending, SWI_VM_PENDING) - -DO_SETBITS(schedsoftcamnet, &idelayed, SWI_CAMNET_PENDING) -DO_SETBITS(schedsoftcambio, &idelayed, SWI_CAMBIO_PENDING) -DO_SETBITS(schedsoftnet, &idelayed, SWI_NET_PENDING) -DO_SETBITS(schedsofttty, &idelayed, SWI_TTY_PENDING) -DO_SETBITS(schedsoftvm, &idelayed, SWI_VM_PENDING) - unsigned softclockpending(void) { |