Subject: kern_proc.c patch
To: None <current-users@netbsd.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 01/22/2000 12:18:42
By popular demand, here is the the patch to kern_proc.c.
-- Jason R. Thorpe <thorpej@nas.nasa.gov>
Index: kern_proc.c
===================================================================
RCS file: /cvsroot/syssrc/sys/kern/kern_proc.c,v
retrieving revision 1.36
retrieving revision 1.38
diff -c -r1.36 -r1.38
*** kern_proc.c 2000/01/13 21:55:36 1.36
--- kern_proc.c 2000/01/22 16:53:50 1.38
***************
*** 1,4 ****
! /* $NetBSD: kern_proc.c,v 1.36 2000/01/13 21:55:36 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
--- 1,4 ----
! /* $NetBSD: kern_proc.c,v 1.38 2000/01/22 16:53:50 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
***************
*** 119,126 ****
*
* 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 softclock interrupts (since
! * the interrupt context is the timeout-driven schedcpu()).
*
* The proclist lock locks the following structures:
*
--- 119,127 ----
*
* 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 clock interrupts to
! * lock out any scheduling changes that may happen in interrupt
! * context.
*
* The proclist lock locks the following structures:
*
***************
*** 202,208 ****
{
int error, s;
! s = splsoftclock();
error = spinlockmgr(&proclist_lock, LK_SHARED, NULL);
#ifdef DIAGNOSTIC
if (error)
--- 203,209 ----
{
int error, s;
! s = splclock();
error = spinlockmgr(&proclist_lock, LK_SHARED, NULL);
#ifdef DIAGNOSTIC
if (error)
***************
*** 219,225 ****
{
int s;
! s = splsoftclock();
(void) spinlockmgr(&proclist_lock, LK_RELEASE, NULL);
splx(s);
}
--- 220,226 ----
{
int s;
! s = splclock();
(void) spinlockmgr(&proclist_lock, LK_RELEASE, NULL);
splx(s);
}
***************
*** 232,238 ****
{
int error, s;
! s = splsoftclock();
error = spinlockmgr(&proclist_lock, LK_EXCLUSIVE, NULL);
#ifdef DIAGNOSTIC
if (error != 0)
--- 233,239 ----
{
int error, s;
! s = splclock();
error = spinlockmgr(&proclist_lock, LK_EXCLUSIVE, NULL);
#ifdef DIAGNOSTIC
if (error != 0)