summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-04-06 10:11:14 +0000
committerjeff <jeff@FreeBSD.org>2005-04-06 10:11:14 +0000
commita3d1d94c5a8970e2f052993d02a0018cc79fb836 (patch)
tree2af3b0100b0d86d87aa8968743666cbc9b75a085 /sys/kern
parent60d07eec30ec71879fa602ff8f7bccf45bf7b57c (diff)
downloadFreeBSD-src-a3d1d94c5a8970e2f052993d02a0018cc79fb836.zip
FreeBSD-src-a3d1d94c5a8970e2f052993d02a0018cc79fb836.tar.gz
- Remove dead code.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_lock.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 019a26b..490244f 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -57,45 +57,21 @@ __FBSDID("$FreeBSD$");
* Locks provide shared/exclusive sychronization.
*/
-#define LOCK_WAIT_TIME 100
-#define LOCK_SAMPLE_WAIT 7
-
-#if defined(DIAGNOSTIC)
-#define LOCK_INLINE
-#else
-#define LOCK_INLINE __inline
-#endif
-
#define COUNT(td, x) if ((td)) (td)->td_locks += (x)
-
#define LK_ALL (LK_HAVE_EXCL | LK_WANT_EXCL | LK_WANT_UPGRADE | \
LK_SHARE_NONZERO | LK_WAIT_NONZERO)
-/*
- * Mutex array variables. Rather than each lockmgr lock having its own mutex,
- * share a fixed (at boot time) number of mutexes across all lockmgr locks in
- * order to keep sizeof(struct lock) down.
- */
-static struct mtx lock_mtx;
-
static int acquire(struct lock **lkpp, int extflags, int wanted);
static int acquiredrain(struct lock *lkp, int extflags) ;
-static void
-lockmgr_init(void *dummy __unused)
-{
- mtx_init(&lock_mtx, "lockmgr", NULL, MTX_DEF);
-}
-SYSINIT(lmgrinit, SI_SUB_LOCKMGR, SI_ORDER_FIRST, lockmgr_init, NULL)
-
-static LOCK_INLINE void
+static __inline void
sharelock(struct thread *td, struct lock *lkp, int incr) {
lkp->lk_flags |= LK_SHARE_NONZERO;
lkp->lk_sharecount += incr;
COUNT(td, incr);
}
-static LOCK_INLINE void
+static __inline void
shareunlock(struct thread *td, struct lock *lkp, int decr) {
KASSERT(lkp->lk_sharecount >= decr, ("shareunlock: count < decr"));
OpenPOWER on IntegriCloud