don't grab kernel lock for SYCALL_MPSAFE syscalls.
This commit is contained in:
parent
ad67de5ad8
commit
f16e031e00
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: syscall.c,v 1.24 2003/10/08 00:28:41 thorpej Exp $ */
|
||||
/* $NetBSD: syscall.c,v 1.25 2003/10/26 10:48:08 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.24 2003/10/08 00:28:41 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.25 2003/10/26 10:48:08 yamt Exp $");
|
||||
|
||||
#include "opt_syscall_debug.h"
|
||||
#include "opt_vm86.h"
|
||||
@ -152,9 +152,13 @@ syscall_plain(frame)
|
||||
rval[0] = 0;
|
||||
rval[1] = 0;
|
||||
|
||||
KERNEL_PROC_LOCK(l);
|
||||
error = (*callp->sy_call)(l, args, rval);
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
if (callp->sy_flags & SYCALL_MPSAFE) {
|
||||
error = (*callp->sy_call)(l, args, rval);
|
||||
} else {
|
||||
KERNEL_PROC_LOCK(l);
|
||||
error = (*callp->sy_call)(l, args, rval);
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
}
|
||||
|
||||
switch (error) {
|
||||
case 0:
|
||||
@ -243,8 +247,13 @@ syscall_fancy(frame)
|
||||
|
||||
rval[0] = 0;
|
||||
rval[1] = 0;
|
||||
error = (*callp->sy_call)(l, args, rval);
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
if (callp->sy_flags & SYCALL_MPSAFE) {
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
error = (*callp->sy_call)(l, args, rval);
|
||||
} else {
|
||||
error = (*callp->sy_call)(l, args, rval);
|
||||
KERNEL_PROC_UNLOCK(l);
|
||||
}
|
||||
switch (error) {
|
||||
case 0:
|
||||
frame->tf_eax = rval[0];
|
||||
|
Loading…
Reference in New Issue
Block a user