summaryrefslogtreecommitdiff
path: root/kern/rtmutex.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-01-07 00:35:46 +0100
committerRichard Braun <rbraun@sceen.net>2018-01-07 00:35:46 +0100
commit2396ae7dc601c9159ce1a86274133a7f90bf3aca (patch)
treed352cb9978e4c43693972235cb4c1a9dd8c5ebe9 /kern/rtmutex.c
parenta97a2bc6f1c24851ef19600a7bd15b211137abfe (diff)
kern/Kconfig: new MUTEX_DEBUG option
Diffstat (limited to 'kern/rtmutex.c')
-rw-r--r--kern/rtmutex.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/kern/rtmutex.c b/kern/rtmutex.c
index 00d87dfe..36c72a37 100644
--- a/kern/rtmutex.c
+++ b/kern/rtmutex.c
@@ -29,11 +29,7 @@
#include <kern/thread.h>
#include <kern/turnstile.h>
-#ifndef RTMUTEX_DEBUG
-#define RTMUTEX_DEBUG 0
-#endif /* RTMUTEX_DEBUG */
-
-#if RTMUTEX_DEBUG
+#ifdef CONFIG_MUTEX_DEBUG
enum {
RTMUTEX_SC_WAIT_SUCCESSES,
@@ -75,10 +71,10 @@ rtmutex_inc_sc(unsigned int index)
syscnt_inc(&rtmutex_sc_array[index]);
}
-#else /* RTMUTEX_DEBUG */
+#else /* CONFIG_MUTEX_DEBUG */
#define rtmutex_setup_debug()
#define rtmutex_inc_sc(x)
-#endif /* RTMUTEX_DEBUG */
+#endif /* CONFIG_MUTEX_DEBUG */
static struct thread *
rtmutex_get_thread(uintptr_t owner)
@@ -236,7 +232,7 @@ rtmutex_setup(void)
}
INIT_OP_DEFINE(rtmutex_setup,
-#if RTMUTEX_DEBUG
+#ifdef CONFIG_MUTEX_DEBUG
INIT_OP_DEP(syscnt_setup, true),
-#endif /* RTMUTEX_DEBUG */
+#endif /* CONFIG_MUTEX_DEBUG */
);