Fix the argument to KERNEL_PROC_LOCK/KERNEL_PROC_UNLOCK.

This commit is contained in:
skrll 2004-10-24 06:58:14 +00:00
parent cfe914cf35
commit e0658593c2
3 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: syscall.c,v 1.25 2004/08/21 11:57:36 rearnsha Exp $ */
/* $NetBSD: syscall.c,v 1.26 2004/10/24 06:58:14 skrll Exp $ */
/*-
* Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
@ -82,7 +82,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.25 2004/08/21 11:57:36 rearnsha Exp $");
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.26 2004/10/24 06:58:14 skrll Exp $");
#include <sys/device.h>
#include <sys/errno.h>
@ -146,14 +146,14 @@ swi_handler(trapframe_t *frame)
ksi.ksi_signo = SIGILL;
ksi.ksi_code = ILL_ILLOPC;
ksi.ksi_addr = (u_int32_t *)(intptr_t) (frame->tf_pc-INSN_SIZE);
KERNEL_PROC_LOCK(l->l_proc);
KERNEL_PROC_LOCK(l);
#if 0
/* maybe one day we'll do emulations */
(*l->l_proc->p_emul->e_trapsignal)(l, &ksi);
#else
trapsignal(l, &ksi);
#endif
KERNEL_PROC_UNLOCK(l->l_proc);
KERNEL_PROC_UNLOCK(l);
userret(l);
return;
}
@ -243,7 +243,7 @@ syscall_plain(struct trapframe *frame, struct lwp *l, u_int32_t insn)
register_t *ap, *args, copyargs[MAXARGS], rval[2];
ksiginfo_t ksi;
KERNEL_PROC_LOCK(p);
KERNEL_PROC_LOCK(l);
switch (insn & SWI_OS_MASK) { /* Which OS is the SWI from? */
case SWI_OS_ARM: /* ARM-defined SWIs */
@ -389,7 +389,7 @@ syscall_fancy(struct trapframe *frame, struct lwp *l, u_int32_t insn)
register_t *ap, *args, copyargs[MAXARGS], rval[2];
ksiginfo_t ksi;
KERNEL_PROC_LOCK(p);
KERNEL_PROC_LOCK(l);
switch (insn & SWI_OS_MASK) { /* Which OS is the SWI from? */
case SWI_OS_ARM: /* ARM-defined SWIs */
@ -550,9 +550,9 @@ child_return(arg)
userret(l);
#ifdef KTRACE
if (KTRPOINT(p, KTR_SYSRET)) {
KERNEL_PROC_LOCK(p);
KERNEL_PROC_LOCK(l);
ktrsysret(p, SYS_fork, 0, 0);
KERNEL_PROC_UNLOCK(p);
KERNEL_PROC_UNLOCK(l);
}
#endif
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: undefined.c,v 1.24 2004/08/21 12:03:16 rearnsha Exp $ */
/* $NetBSD: undefined.c,v 1.25 2004/10/24 06:58:14 skrll Exp $ */
/*
* Copyright (c) 2001 Ben Harris.
@ -54,7 +54,7 @@
#include <sys/kgdb.h>
#endif
__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.24 2004/08/21 12:03:16 rearnsha Exp $");
__KERNEL_RCSID(0, "$NetBSD: undefined.c,v 1.25 2004/10/24 06:58:14 skrll Exp $");
#include <sys/malloc.h>
#include <sys/queue.h>
@ -155,9 +155,9 @@ gdb_trapper(u_int addr, u_int insn, struct trapframe *frame, int code)
ksi.ksi_code = TRAP_BRKPT;
ksi.ksi_addr = (u_int32_t *)addr;
ksi.ksi_trap = 0;
KERNEL_PROC_LOCK(l->l_proc);
KERNEL_PROC_LOCK(l);
trapsignal(l, &ksi);
KERNEL_PROC_UNLOCK(l->l_proc);
KERNEL_PROC_UNLOCK(l);
return 0;
}
#ifdef KGDB

View File

@ -1,4 +1,4 @@
/* $NetBSD: fault.c,v 1.51 2004/08/21 12:04:17 rearnsha Exp $ */
/* $NetBSD: fault.c,v 1.52 2004/10/24 06:58:14 skrll Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@ -81,7 +81,7 @@
#include "opt_kgdb.h"
#include <sys/types.h>
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.51 2004/08/21 12:04:17 rearnsha Exp $");
__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.52 2004/10/24 06:58:14 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -174,9 +174,9 @@ static __inline void
call_trapsignal(struct lwp *l, ksiginfo_t *ksi)
{
KERNEL_PROC_LOCK(l->l_proc);
KERNEL_PROC_LOCK(l);
TRAPSIGNAL(l, ksi);
KERNEL_PROC_UNLOCK(l->l_proc);
KERNEL_PROC_UNLOCK(l);
}
static __inline int