From 5a5a78fb02ac6f08f7ff22f0885cf6c2c5ea5691 Mon Sep 17 00:00:00 2001 From: ad Date: Wed, 10 Oct 2007 17:37:40 +0000 Subject: [PATCH] Kill transferlockers() now that it's unused. --- sys/kern/kern_lock.c | 24 ++---------------------- sys/sys/lock.h | 3 +-- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 5901a9b7e187..da312ec69732 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lock.c,v 1.120 2007/09/17 21:33:34 ad Exp $ */ +/* $NetBSD: kern_lock.c,v 1.121 2007/10/10 17:37:40 ad Exp $ */ /*- * Copyright (c) 1999, 2000, 2006, 2007 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.120 2007/09/17 21:33:34 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.121 2007/10/10 17:37:40 ad Exp $"); #include "opt_multiprocessor.h" #include "opt_ddb.h" @@ -428,26 +428,6 @@ lockpanic(volatile struct lock *lkp, const char *fmt, ...) ); } -/* - * Transfer any waiting processes from one lock to another. - */ -void -transferlockers(struct lock *from, struct lock *to) -{ - - KASSERT(from != to); - KASSERT((from->lk_flags & LK_WAITDRAIN) == 0); - if (from->lk_waitcount == 0) - return; - from->lk_newlock = to; - wakeup((void *)from); - tsleep((void *)&from->lk_newlock, from->lk_prio, "lkxfer", 0); - from->lk_newlock = NULL; - from->lk_flags &= ~(LK_WANT_EXCL | LK_WANT_UPGRADE); - KASSERT(from->lk_waitcount == 0); -} - - /* * Initialize a lock; required before use. */ diff --git a/sys/sys/lock.h b/sys/sys/lock.h index 545da35438a5..fda56fe034e1 100644 --- a/sys/sys/lock.h +++ b/sys/sys/lock.h @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.72 2007/07/29 12:40:37 pooka Exp $ */ +/* $NetBSD: lock.h,v 1.73 2007/10/10 17:37:40 ad Exp $ */ /*- * Copyright (c) 1999, 2000, 2006, 2007 The NetBSD Foundation, Inc. @@ -311,7 +311,6 @@ int _lockmgr(volatile struct lock *, u_int, struct simplelock *, #else int lockmgr(volatile struct lock *, u_int flags, struct simplelock *); #endif /* LOCKDEBUG */ -void transferlockers(struct lock *, struct lock *); int lockstatus(struct lock *); void lockmgr_printinfo(volatile struct lock *);