summaryrefslogtreecommitdiff
path: root/configfrag.ac
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-15 18:30:28 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-17 15:57:15 +0200
commite6c6e15b03639e98df68df35ba0f639bdbc1dc51 (patch)
tree7a8a3c3d253e8d6e38390f17581e0dd2dcb295dc /configfrag.ac
parent347cb29151859a56a6c5f0f355a43033e5e035a5 (diff)
kern: keep track of the writer when debugging locks
* configfrag.ac (MACH_LDEBUG): Adjust comment, we use it to sanity check all locks now. * kern/lock.c (lock_write): Keep track of the writer thread. (lock_done): Clear writer. (lock_read_to_write): Keep track of the writer thread. (lock_write_to_read): Assert that the current thread holds the lock. Clear writer. (lock_try_write): Keep track of the writer thread. (lock_try_read_to_write): Likewise. (lock_set_recursive): Assert that the current thread holds the lock. * kern/lock.h (struct lock): New field `writer'. (have_read_lock, have_write_lock, have_lock): New macros that can be used to assert that the current thread holds the given lock. If MACH_LDEBUG is not set, they evaluate to true.
Diffstat (limited to 'configfrag.ac')
-rw-r--r--configfrag.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configfrag.ac b/configfrag.ac
index e41a3a1c..c0e04b32 100644
--- a/configfrag.ac
+++ b/configfrag.ac
@@ -63,7 +63,7 @@ AC_DEFINE([MACH_IPC_DEBUG], [1], [MACH_IPC_DEBUG])
# Testing code/printfs.
AC_DEFINE([MACH_IPC_TEST], [0], [MACH_IPC_TEST])
-# Sanity-check simple locking.
+# Sanity-check locking.
AC_DEFINE([MACH_LDEBUG], [0], [MACH_LDEBUG])
# MP lock monitoring. Registers use of locks, contention. Depending on