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.
This commit is contained in:
thorpej 2000-01-22 16:53:50 +00:00
parent 05261ccb43
commit 2ad35b74df

View File

@ -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 @@ struct proclist zombproc; /* resources have been freed */
*
* 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 @@ proclist_lock_read()
{
int error, s;
s = splstatclock();
s = splclock();
error = spinlockmgr(&proclist_lock, LK_SHARED, NULL);
#ifdef DIAGNOSTIC
if (error)
@ -220,7 +220,7 @@ proclist_unlock_read()
{
int s;
s = splstatclock();
s = splclock();
(void) spinlockmgr(&proclist_lock, LK_RELEASE, NULL);
splx(s);
}
@ -233,7 +233,7 @@ proclist_lock_write()
{
int error, s;
s = splstatclock();
s = splclock();
error = spinlockmgr(&proclist_lock, LK_EXCLUSIVE, NULL);
#ifdef DIAGNOSTIC
if (error != 0)