diff options
author | Richard Braun <rbraun@sceen.net> | 2018-01-07 00:35:46 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-01-07 00:35:46 +0100 |
commit | 2396ae7dc601c9159ce1a86274133a7f90bf3aca (patch) | |
tree | d352cb9978e4c43693972235cb4c1a9dd8c5ebe9 /kern/mutex/mutex_plain.c | |
parent | a97a2bc6f1c24851ef19600a7bd15b211137abfe (diff) |
kern/Kconfig: new MUTEX_DEBUG option
Diffstat (limited to 'kern/mutex/mutex_plain.c')
-rw-r--r-- | kern/mutex/mutex_plain.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/kern/mutex/mutex_plain.c b/kern/mutex/mutex_plain.c index 2c655940..8945014f 100644 --- a/kern/mutex/mutex_plain.c +++ b/kern/mutex/mutex_plain.c @@ -27,11 +27,7 @@ #include <kern/sleepq.h> #include <kern/syscnt.h> -#ifndef MUTEX_PLAIN_DEBUG -#define MUTEX_PLAIN_DEBUG 0 -#endif /* MUTEX_PLAIN_DEBUG */ - -#if MUTEX_PLAIN_DEBUG +#ifdef CONFIG_MUTEX_DEBUG enum { MUTEX_PLAIN_SC_WAIT_SUCCESSES, @@ -70,10 +66,10 @@ mutex_plain_inc_sc(unsigned int index) syscnt_inc(&mutex_plain_sc_array[index]); } -#else /* MUTEX_PLAIN_DEBUG */ +#else /* CONFIG_MUTEX_DEBUG */ #define mutex_plain_setup_debug() #define mutex_plain_inc_sc(x) -#endif /* MUTEX_PLAIN_DEBUG */ +#endif /* CONFIG_MUTEX_DEBUG */ static int mutex_plain_lock_slow_common(struct mutex *mutex, bool timed, uint64_t ticks) @@ -170,7 +166,7 @@ mutex_plain_setup(void) } INIT_OP_DEFINE(mutex_plain_setup, -#if MUTEX_PLAIN_DEBUG +#ifdef CONFIG_MUTEX_DEBUG INIT_OP_DEP(syscnt_setup, true), -#endif /* MUTEX_PLAIN_DEBUG */ +#endif /* CONFIG_MUTEX_DEBUG */ ); |