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/isa Use a lock prefix to protect...



details:   https://anonhg.NetBSD.org/src/rev/5421c0bf7dda
branches:  sommerfeld_i386mp_1
changeset: 482557:5421c0bf7dda
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Tue Jun 25 01:06:14 2002 +0000

description:
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/isa/icu.s |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 4c9f25ca0a4c -r 5421c0bf7dda sys/arch/i386/isa/icu.s
--- a/sys/arch/i386/isa/icu.s   Tue Jun 25 01:02:38 2002 +0000
+++ b/sys/arch/i386/isa/icu.s   Tue Jun 25 01:06:14 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: icu.s,v 1.61.10.7 2001/12/29 23:31:08 sommerfeld Exp $ */
+/*     $NetBSD: icu.s,v 1.61.10.8 2002/06/25 01:06:14 fvdl Exp $       */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -89,6 +89,9 @@
        andl    _C_LABEL(ipending),%eax         # any non-masked bits left?
        jz      2f
        bsfl    %eax,%eax
+#ifdef MULTIPROCESSOR
+       lock
+#endif
        btrl    %eax,_C_LABEL(ipending)
        jnc     1b
        jmp     *_C_LABEL(Xrecurse)(,%eax,4)
@@ -115,6 +118,9 @@
        andl    _C_LABEL(ipending),%eax
        jz      2f
        bsfl    %eax,%eax               # slow, but not worth optimizing
+#ifdef MULTIPROCESSOR
+       lock
+#endif
        btrl    %eax,_C_LABEL(ipending)
        jnc     1b                      # some intr cleared the in-memory bit
        jmp     *_C_LABEL(Xresume)(,%eax,4)



Home | Main Index | Thread Index | Old Index