summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2007-11-24 04:22:28 +0000
committerattilio <attilio@FreeBSD.org>2007-11-24 04:22:28 +0000
commitc61d48e731f72a04c3b15745e039aa34cb4f8034 (patch)
treea93f7f1d3eed1ae07881b2a038818ab586263a3f /sys/kern/kern_lock.c
parent10f5cced580117052ba3bbd93cb75ea6ba31d3ba (diff)
downloadFreeBSD-src-c61d48e731f72a04c3b15745e039aa34cb4f8034.zip
FreeBSD-src-c61d48e731f72a04c3b15745e039aa34cb4f8034.tar.gz
transferlockers() is a very dangerous and hack-ish function as waiters
should never be moved by one lock to another. As, luckily, nothing in our tree is using it, axe the function. This breaks lockmgr KPI, so interested, third-party modules should update their source code with appropriate replacement. Ok'ed by: ups, rwatson MFC after: 3 days
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 6a5f213..b06e17e 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -506,34 +506,6 @@ acquiredrain(struct lock *lkp, int extflags) {
}
/*
- * Transfer any waiting processes from one lock to another.
- */
-void
-transferlockers(from, to)
- struct lock *from;
- struct lock *to;
-{
-
- KASSERT(from != to, ("lock transfer to self"));
- KASSERT((from->lk_flags&LK_WAITDRAIN) == 0, ("transfer draining lock"));
-
- mtx_lock(from->lk_interlock);
- if (from->lk_waitcount == 0) {
- mtx_unlock(from->lk_interlock);
- return;
- }
- from->lk_newlock = to;
- wakeup((void *)from);
- msleep(&from->lk_newlock, from->lk_interlock, from->lk_prio,
- "lkxfer", 0);
- from->lk_newlock = NULL;
- from->lk_flags &= ~(LK_WANT_EXCL | LK_WANT_UPGRADE);
- KASSERT(from->lk_waitcount == 0, ("active lock"));
- mtx_unlock(from->lk_interlock);
-}
-
-
-/*
* Initialize a lock; required before use.
*/
void
OpenPOWER on IntegriCloud