From c04c1bdd385af886422b89e1bf751b9a9d322ffc Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Thu, 31 Aug 2017 23:17:47 +0200 Subject: Make mutex debugging slightly more convenient Define the macro controlling mutex debugging only if not already defined, allowing users to pass it through CFLAGS. --- kern/mutex/mutex_adaptive.c | 3 ++- kern/mutex/mutex_plain.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'kern/mutex') diff --git a/kern/mutex/mutex_adaptive.c b/kern/mutex/mutex_adaptive.c index ceec8f10..d5cab2f4 100644 --- a/kern/mutex/mutex_adaptive.c +++ b/kern/mutex/mutex_adaptive.c @@ -31,8 +31,9 @@ #include #include -/* Set to 1 to enable debugging */ +#ifndef MUTEX_ADAPTIVE_DEBUG #define MUTEX_ADAPTIVE_DEBUG 0 +#endif /* MUTEX_ADAPTIVE_DEBUG */ #if MUTEX_ADAPTIVE_DEBUG diff --git a/kern/mutex/mutex_plain.c b/kern/mutex/mutex_plain.c index 6a7cbdc3..2c655940 100644 --- a/kern/mutex/mutex_plain.c +++ b/kern/mutex/mutex_plain.c @@ -27,8 +27,9 @@ #include #include -/* Set to 1 to enable debugging */ +#ifndef MUTEX_PLAIN_DEBUG #define MUTEX_PLAIN_DEBUG 0 +#endif /* MUTEX_PLAIN_DEBUG */ #if MUTEX_PLAIN_DEBUG -- cgit v1.2.3