From 2508f69037f9df2aba92286b309971300346b33d Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Wed, 31 Jan 2001 04:29:52 +0000 Subject: [PATCH] Zap last remaining references to (and a use use of) of simple_locks. --- sys/fs/hpfs/hpfs_hash.c | 2 +- sys/i386/include/smptests.h | 10 ---------- sys/kern/kern_synch.c | 4 ---- sys/sys/proc.h | 1 - 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/sys/fs/hpfs/hpfs_hash.c b/sys/fs/hpfs/hpfs_hash.c index 0fe3f4f2ca8b..8b893bf0389a 100644 --- a/sys/fs/hpfs/hpfs_hash.c +++ b/sys/fs/hpfs/hpfs_hash.c @@ -137,7 +137,7 @@ loop: if (ino == hp->h_no && dev == hp->h_dev) { vp = HPTOV(hp); mtx_enter(&vp->v_interlock, MTX_DEF); - simple_unlock (&hpfs_hphash_slock); + mtx_exit(&hpfs_hphash_mtx, MTX_DEF); if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) goto loop; return (vp); diff --git a/sys/i386/include/smptests.h b/sys/i386/include/smptests.h index 8114c8a321c6..c1a22419379c 100644 --- a/sys/i386/include/smptests.h +++ b/sys/i386/include/smptests.h @@ -61,16 +61,6 @@ #define PUSHDOWN_LEVEL_1 #define PUSHDOWN_LEVEL_2 -/* - * Debug version of simple_lock. This will store the CPU id of the - * holding CPU along with the lock. When a CPU fails to get the lock - * it compares its own id to the holder id. If they are the same it - * panic()s, as simple locks are binary, and this would cause a deadlock. - * - */ -#define SL_DEBUG - - /* * Put FAST_INTR() ISRs at an APIC priority above the regular INTs. * Allow the mp_lock() routines to handle FAST interrupts while spinning. diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 2daf9965317b..2518a287d099 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -917,10 +917,6 @@ mi_switch() mtx_assert(&sched_lock, MA_OWNED | MA_NOTRECURSED); -#ifdef SIMPLELOCK_DEBUG - if (p->p_simple_locks) - printf("sleep: holding simple lock\n"); -#endif /* * Compute the amount of time during which the current * process was running, and add that to its total so far. diff --git a/sys/sys/proc.h b/sys/sys/proc.h index ef1af7ea4e1e..c296db20faca 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -222,7 +222,6 @@ struct proc { char p_rqindex; /* (j) Run queue index. */ short p_locks; /* (*) DEBUG: lockmgr count of held locks */ - short p_simple_locks; /* (*) DEBUG: count of held simple locks */ u_int p_stops; /* (c) Procfs event bitmask. */ u_int p_stype; /* (c) Procfs stop event type. */ char p_step; /* (c) Procfs stop *once* flag. */