summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kern/lock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kern/lock.h b/kern/lock.h
index 2781a48..74cd933 100644
--- a/kern/lock.h
+++ b/kern/lock.h
@@ -202,6 +202,7 @@ extern boolean_t lock_try_read_to_write(lock_t);
#define lock_read_done(l) lock_done(l)
#define lock_write_done(l) lock_done(l)
+#define lock_taken(l) ((l)->want_write || (l)->read_count)
extern void lock_set_recursive(lock_t);
extern void lock_clear_recursive(lock_t);