summaryrefslogtreecommitdiff
path: root/kern/lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/lock.c')
-rw-r--r--kern/lock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kern/lock.c b/kern/lock.c
index 1daf1b4..473e602 100644
--- a/kern/lock.c
+++ b/kern/lock.c
@@ -340,6 +340,7 @@ void lock_done(
else {
l->want_write = FALSE;
#if MACH_LDEBUG
+ assert(have_write_lock(l));
l->writer = THREAD_NULL;
#endif /* MACH_LDEBUG */
}