summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-07-18 01:26:22 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-09-14 14:45:05 +0200
commit2bd61938337659b6afb05dba595324a6f76b5a4c (patch)
tree011b6f62395e1b0ce2ed9badf6ac0b46db9d980b /kern
parent645b0d0aea30155bb1914678c6202cca06d5a9e3 (diff)
kern/lock: add lock_taken
* kern/lock.h (lock_taken): New macro.
Diffstat (limited to 'kern')
-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);