summaryrefslogtreecommitdiff
path: root/sys/kern/kern_rwlock.c
diff options
context:
space:
mode:
authorMerlin Scholz <merlin@scholz.ruhr>2023-03-16 23:26:30 +0100
committerMerlin Scholz <merlin@scholz.ruhr>2023-03-16 23:26:30 +0100
commit776ee58682b55a490930b73105b3596dde1f16fa (patch)
treeb41d6963b6f2d4f07bdcf5d478bcbc652c28cda0 /sys/kern/kern_rwlock.c
parentbf1ce4ce265b9f38a71f0bca82d8f0e8c055233a (diff)
Implement logging for rwlock_enter() and rwlock_exit(), move from do-while macros to dedicated functions to allow for return values.
Diffstat (limited to 'sys/kern/kern_rwlock.c')
-rw-r--r--sys/kern/kern_rwlock.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c
index fbdbcdad870..90f2543c138 100644
--- a/sys/kern/kern_rwlock.c
+++ b/sys/kern/kern_rwlock.c
@@ -143,10 +143,16 @@ rw_swap(krwlock_t *rw, uintptr_t o, uintptr_t n)
#endif
#ifndef __HAVE_RW_STUBS
+#ifdef LOCKDOC
+__strong_alias(_rw_enter,rw_vector_enter);
+__strong_alias(_rw_exit,rw_vector_exit);
+__strong_alias(_rw_tryenter,rw_vector_tryenter);
+#else
__strong_alias(rw_enter,rw_vector_enter);
__strong_alias(rw_exit,rw_vector_exit);
__strong_alias(rw_tryenter,rw_vector_tryenter);
#endif
+#endif
lockops_t rwlock_lockops = {
.lo_name = "Reader / writer lock",