diff options
author | fsmp <fsmp@FreeBSD.org> | 1997-08-30 08:08:10 +0000 |
---|---|---|
committer | fsmp <fsmp@FreeBSD.org> | 1997-08-30 08:08:10 +0000 |
commit | e2310cdbcf324f3bbeda76add82e773d37ee43cd (patch) | |
tree | ab2ac308116ca3f26a9055eae17d100d5901e501 /sys/i386/include/cpufunc.h | |
parent | 62dbf14e9ad4dbe9bc03c2657d854b47ef4b3f65 (diff) | |
download | FreeBSD-src-e2310cdbcf324f3bbeda76add82e773d37ee43cd.zip FreeBSD-src-e2310cdbcf324f3bbeda76add82e773d37ee43cd.tar.gz |
Another round of lock pushdown.
Add a simplelock to deal with disable_intr()/enable_intr() as used in UP kernel.
UP kernel expects that this is enough to guarantee exclusive access to
regions of code bracketed by these 2 functions.
Add a simplelock to bracket clock accesses in clock.c: clock_lock.
Help from: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'sys/i386/include/cpufunc.h')
-rw-r--r-- | sys/i386/include/cpufunc.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 41e1bd7..9fd475e 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cpufunc.h,v 1.68 1997/05/31 09:13:03 peter Exp $ + * $Id: cpufunc.h,v 1.69 1997/07/17 04:33:46 dyson Exp $ */ /* @@ -43,6 +43,9 @@ #include <sys/cdefs.h> #include <sys/types.h> +#include <machine/lock.h> + + #ifdef __GNUC__ static __inline void @@ -55,11 +58,13 @@ static __inline void disable_intr(void) { __asm __volatile("cli" : : : "memory"); + MPINTR_LOCK(); } static __inline void enable_intr(void) { + MPINTR_UNLOCK(); __asm __volatile("sti"); } |