Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern After some discussion with Mycroft, change splstatc...



details:   https://anonhg.NetBSD.org/src/rev/b84520260efa
branches:  trunk
changeset: 480887:b84520260efa
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Jan 22 16:53:50 2000 +0000

description:
After some discussion with Mycroft, change splstatclock() to splclock().
The rule is that you don't get to call scheduler-related functions (e.g.
wakeup()) above the clock interrupt.  Going to statclock unnecessarily
hoses e.g. serial interrupts on the SPARC.

diffstat:

 sys/kern/kern_proc.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r d685bbc71689 -r b84520260efa sys/kern/kern_proc.c
--- a/sys/kern/kern_proc.c      Sat Jan 22 16:35:25 2000 +0000
+++ b/sys/kern/kern_proc.c      Sat Jan 22 16:53:50 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_proc.c,v 1.37 2000/01/22 16:32:02 thorpej Exp $   */
+/*     $NetBSD: kern_proc.c,v 1.38 2000/01/22 16:53:50 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -119,7 +119,7 @@
  *
  * We have two types of locks on the proclists: read locks and write
  * locks.  Read locks can be used in interrupt context, so while we
- * hold the write lock, we must also block statclock interrupts to
+ * hold the write lock, we must also block clock interrupts to
  * lock out any scheduling changes that may happen in interrupt
  * context.
  *
@@ -203,7 +203,7 @@
 {
        int error, s;
 
-       s = splstatclock();
+       s = splclock();
        error = spinlockmgr(&proclist_lock, LK_SHARED, NULL);
 #ifdef DIAGNOSTIC
        if (error)
@@ -220,7 +220,7 @@
 {
        int s;
 
-       s = splstatclock();
+       s = splclock();
        (void) spinlockmgr(&proclist_lock, LK_RELEASE, NULL);
        splx(s);
 }
@@ -233,7 +233,7 @@
 {
        int error, s;
 
-       s = splstatclock();
+       s = splclock();
        error = spinlockmgr(&proclist_lock, LK_EXCLUSIVE, NULL);
 #ifdef DIAGNOSTIC
        if (error != 0)



Home | Main Index | Thread Index | Old Index