diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-11-19 02:18:03 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-11-19 02:18:03 +0000 |
commit | 4e00bfe9e4fce563a74dcd487149539b6bc02ba9 (patch) | |
tree | a134970c4687287588758bb78c439e9cde819bb9 /sys/arch/i386 | |
parent | 16017b33d1fad6b6fd295f39b365b33719b42ae9 (diff) |
Remove unnecessary lockmgr() archaism that was costing too much in terms
of panics and bugfixes. Access curproc directly, do not expect a process
pointer as an argument. Should fix many "process context required" bugs.
Incentive and okay millert@, okay marc@. Various testing, thanks.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/apm.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/i386/gdt.c | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c index 0d097d4bcfb..ab130a7a2e8 100644 --- a/sys/arch/i386/i386/apm.c +++ b/sys/arch/i386/i386/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.66 2005/06/16 16:49:04 beck Exp $ */ +/* $OpenBSD: apm.c,v 1.67 2005/11/19 02:18:00 pedro Exp $ */ /*- * Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved. @@ -75,8 +75,8 @@ #define DPRINTF(x) /**/ #endif -#define APM_LOCK(sc) lockmgr(&(sc)->sc_lock, LK_EXCLUSIVE, NULL, curproc) -#define APM_UNLOCK(sc) lockmgr(&(sc)->sc_lock, LK_RELEASE, NULL, curproc) +#define APM_LOCK(sc) lockmgr(&(sc)->sc_lock, LK_EXCLUSIVE, NULL) +#define APM_UNLOCK(sc) lockmgr(&(sc)->sc_lock, LK_RELEASE, NULL) struct cfdriver apm_cd = { NULL, "apm", DV_DULL diff --git a/sys/arch/i386/i386/gdt.c b/sys/arch/i386/i386/gdt.c index bfe166f6bea..c3c2cdf6c41 100644 --- a/sys/arch/i386/i386/gdt.c +++ b/sys/arch/i386/i386/gdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt.c,v 1.23 2005/09/25 20:48:21 miod Exp $ */ +/* $OpenBSD: gdt.c,v 1.24 2005/11/19 02:18:00 pedro Exp $ */ /* $NetBSD: gdt.c,v 1.28 2002/12/14 09:38:50 junyoung Exp $ */ /*- @@ -95,15 +95,14 @@ static __inline void gdt_lock() { if (curproc != NULL) - lockmgr(&gdt_lock_store, LK_EXCLUSIVE, &gdt_simplelock, - curproc); + lockmgr(&gdt_lock_store, LK_EXCLUSIVE, &gdt_simplelock); } static __inline void gdt_unlock() { if (curproc != NULL) - lockmgr(&gdt_lock_store, LK_RELEASE, &gdt_simplelock, curproc); + lockmgr(&gdt_lock_store, LK_RELEASE, &gdt_simplelock); } /* XXX needs spinlocking if we ever mean to go finegrained. */ |