diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-01-08 18:52:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-01-08 18:52:02 +0000 |
commit | d294331e61b1ce67851369c8b9d0344d2c7a9873 (patch) | |
tree | b8ff6209ace44d811e02962977d30fbc27c48d6c /sys/arch/i386 | |
parent | d10dd84c02399ebc8d94d82604703a053c716fa0 (diff) |
from netbsd; Hand-code softintr()
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/include/psl.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/sys/arch/i386/include/psl.h b/sys/arch/i386/include/psl.h index 52747892ae2..3d527e12be5 100644 --- a/sys/arch/i386/include/psl.h +++ b/sys/arch/i386/include/psl.h @@ -1,4 +1,4 @@ -/* $NetBSD: psl.h,v 1.25 1996/01/07 03:59:32 mycroft Exp $ */ +/* $NetBSD: psl.h,v 1.26 1996/01/07 21:48:35 mycroft Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -175,12 +175,21 @@ spllower(ncpl) /* * Software interrupt registration + * + * We hand-code this to ensure that it's atomic. */ -#define softintr(n) (ipending |= (1 << (n))) +static __inline void +softintr(mask) + register int mask; +{ + + __asm __volatile("orl %0,_ipending" : : "ir" (mask)); +} + #define setsoftast() (astpending = 1) -#define setsoftclock() softintr(SIR_CLOCK) -#define setsoftnet() softintr(SIR_NET) -#define setsofttty() softintr(SIR_TTY) +#define setsoftclock() softintr(1 << SIR_CLOCK) +#define setsoftnet() softintr(1 << SIR_NET) +#define setsofttty() softintr(1 << SIR_TTY) #endif /* !LOCORE */ #endif /* _KERNEL */ |