summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sx.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2007-05-19 20:18:12 +0000
committerjhb <jhb@FreeBSD.org>2007-05-19 20:18:12 +0000
commit3fb1eb1627b5ab7b81d7e6d42c11fd746a2c3740 (patch)
tree52e2dd202169d6fbc0a38fb8900f31972d180fc3 /sys/kern/kern_sx.c
parent52c853aadb49526870eec1c9f09cc63fc3204fc2 (diff)
downloadFreeBSD-src-3fb1eb1627b5ab7b81d7e6d42c11fd746a2c3740.zip
FreeBSD-src-3fb1eb1627b5ab7b81d7e6d42c11fd746a2c3740.tar.gz
Expose sx_xholder() as a public macro. It returns a pointer to the thread
that holds the current exclusive lock, or NULL if no thread holds an exclusive lock. Requested by: pjd
Diffstat (limited to 'sys/kern/kern_sx.c')
-rw-r--r--sys/kern/kern_sx.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c
index 9c3b922..f60e1e1 100644
--- a/sys/kern/kern_sx.c
+++ b/sys/kern/kern_sx.c
@@ -101,14 +101,6 @@ __FBSDID("$FreeBSD$");
*/
#define sx_recursed(sx) ((sx)->sx_recurse != 0)
-/*
- * Return a pointer to the owning thread if the lock is exclusively
- * locked.
- */
-#define sx_xholder(sx) \
- ((sx)->sx_lock & SX_LOCK_SHARED ? NULL : \
- (struct thread *)SX_OWNER((sx)->sx_lock))
-
#ifdef DDB
static void db_show_sx(struct lock_object *lock);
#endif
OpenPOWER on IntegriCloud