diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 6a5f213c177..b06e17ea561 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -505,34 +505,6 @@ acquiredrain(struct lock *lkp, int extflags) { return 0; } -/* - * 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. */ diff --git a/sys/sys/lockmgr.h b/sys/sys/lockmgr.h index 79a51308fdc..9765c364f0c 100644 --- a/sys/sys/lockmgr.h +++ b/sys/sys/lockmgr.h @@ -204,7 +204,6 @@ void lockdestroy(struct lock *); int _lockmgr(struct lock *, u_int flags, struct mtx *, struct thread *p, char *file, int line); -void transferlockers(struct lock *, struct lock *); void lockmgr_printinfo(struct lock *); int lockstatus(struct lock *, struct thread *); int lockcount(struct lock *);