diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-05-31 22:07:54 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-05-31 22:07:54 +0000 |
commit | 1c3b9ab27b11523ba5c0842628d0076e031a21b1 (patch) | |
tree | fd37facd5d0158160b5593c041c61049f0fd6a9d | |
parent | 7ba43246d7656e2cd061f11f30091e6d3821fc3c (diff) |
remove p_lock from struct proc; unused debug goo for lockmgr,
wich gets set and never checked etc...
ok art@,tedu@
-rw-r--r-- | sys/kern/kern_lock.c | 16 | ||||
-rw-r--r-- | sys/sys/proc.h | 3 |
2 files changed, 2 insertions, 17 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 350977aff2f..d13354dde9f 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_lock.c,v 1.29 2007/05/11 10:06:56 pedro Exp $ */ +/* $OpenBSD: kern_lock.c,v 1.30 2007/05/31 22:07:53 thib Exp $ */ /* * Copyright (c) 1995 @@ -61,13 +61,6 @@ void playback_stacktrace(int *, int); * Locks provide shared/exclusive synchronization. */ -#if defined(LOCKDEBUG) || defined(DIAGNOSTIC) /* { */ -#define COUNT(lkp, p, cpu_id, x) \ - (p)->p_locks += (x) -#else -#define COUNT(lkp, p, cpu_id, x) -#endif /* LOCKDEBUG || DIAGNOSTIC */ /* } */ - #ifdef DDB /* { */ #ifdef MULTIPROCESSOR int simple_lock_debugger = 1; /* more serious on MP */ @@ -281,7 +274,6 @@ lockmgr(__volatile struct lock *lkp, u_int flags, struct simplelock *interlkp) if (error) break; lkp->lk_sharecount++; - COUNT(lkp, p, cpu_id, 1); break; } /* @@ -289,7 +281,6 @@ lockmgr(__volatile struct lock *lkp, u_int flags, struct simplelock *interlkp) * An alternative would be to fail with EDEADLK. */ lkp->lk_sharecount++; - COUNT(lkp, p, cpu_id, 1); if (WEHOLDIT(lkp, pid, cpu_id) == 0 || lkp->lk_exclusivecount == 0) @@ -319,7 +310,6 @@ lockmgr(__volatile struct lock *lkp, u_int flags, struct simplelock *interlkp) panic("lockmgr: locking against myself"); } lkp->lk_exclusivecount++; - COUNT(lkp, p, cpu_id, 1); break; } /* @@ -356,7 +346,6 @@ lockmgr(__volatile struct lock *lkp, u_int flags, struct simplelock *interlkp) if (lkp->lk_exclusivecount != 0) panic("lockmgr: non-zero exclusive count"); lkp->lk_exclusivecount = 1; - COUNT(lkp, p, cpu_id, 1); break; case LK_RELEASE: @@ -367,7 +356,6 @@ lockmgr(__volatile struct lock *lkp, u_int flags, struct simplelock *interlkp) pid, lkp->lk_lockholder); } lkp->lk_exclusivecount--; - COUNT(lkp, p, cpu_id, -1); if (lkp->lk_exclusivecount == 0) { lkp->lk_flags &= ~LK_HAVE_EXCL; SETHOLDER(lkp, LK_NOPROC, LK_NOCPU); @@ -379,7 +367,6 @@ lockmgr(__volatile struct lock *lkp, u_int flags, struct simplelock *interlkp) } } else if (lkp->lk_sharecount != 0) { lkp->lk_sharecount--; - COUNT(lkp, p, cpu_id, -1); } #ifdef DIAGNOSTIC else @@ -421,7 +408,6 @@ lockmgr(__volatile struct lock *lkp, u_int flags, struct simplelock *interlkp) #endif HAVEIT(lkp); lkp->lk_exclusivecount = 1; - COUNT(lkp, p, cpu_id, 1); break; default: diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 8af1af06d56..f029a82b7ce 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.h,v 1.98 2007/05/16 17:27:30 art Exp $ */ +/* $OpenBSD: proc.h,v 1.99 2007/05/31 22:07:53 thib Exp $ */ /* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */ /*- @@ -254,7 +254,6 @@ struct proc { u_short p_xstat; /* Exit status for wait; also stop signal. */ u_short p_acflag; /* Accounting flags. */ struct rusage *p_ru; /* Exit information. XXX */ - int p_locks; /* DEBUG: lockmgr count of held locks */ }; #define p_session p_pgrp->pg_session |