Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/sommerfeld_i386mp_1]: src/sys/arch/i386/include Add a spinlock around so...
details: https://anonhg.NetBSD.org/src/rev/4c9f25ca0a4c
branches: sommerfeld_i386mp_1
changeset: 482556:4c9f25ca0a4c
user: fvdl <fvdl%NetBSD.org@localhost>
date: Tue Jun 25 01:02:38 2002 +0000
description:
Add a spinlock around softintr queue management. Use a lock prefix to
protect manipulation of the 'ipending' variable. Fixes 'softclock
stops being called' AKA 'processes entering nanosleep do not return'
problem.
diffstat:
sys/arch/i386/include/intr.h | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r f50994148677 -r 4c9f25ca0a4c sys/arch/i386/include/intr.h
--- a/sys/arch/i386/include/intr.h Mon Jun 24 10:10:18 2002 +0000
+++ b/sys/arch/i386/include/intr.h Tue Jun 25 01:02:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.h,v 1.12.10.20 2002/05/18 17:27:34 sommerfeld Exp $ */
+/* $NetBSD: intr.h,v 1.12.10.21 2002/06/25 01:02:38 fvdl Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -189,7 +189,7 @@
static __inline void
softintr(register int sir)
{
- __asm __volatile("orl %1, %0" : "=m"(ipending) : "ir" (1 << sir));
+ __asm __volatile("lock ; orl %1, %0" : "=m"(ipending) : "ir" (1 << sir));
}
#define setsoftnet() softintr(SIR_NET)
@@ -242,16 +242,19 @@
TAILQ_HEAD(, i386_soft_intrhand)
softintr_q;
int softintr_ssir;
+ struct simplelock softintr_slock;
};
#define i386_softintr_lock(si, s) \
do { \
/* XXX splhigh braindamage on i386 */ \
(s) = splserial(); \
+ simple_lock(&si->softintr_slock); \
} while (/*CONSTCOND*/ 0)
#define i386_softintr_unlock(si, s) \
do { \
+ simple_unlock(&si->softintr_slock); \
splx((s)); \
} while (/*CONSTCOND*/ 0)
Home |
Main Index |
Thread Index |
Old Index