diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-15 16:43:24 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-17 15:42:31 +0200 |
commit | bdc9b8583e6336bb3a44a80f10bac8b7b369719c (patch) | |
tree | 9fe6a45b74a7ed6ecf7a2316c095f875799e5bfc /kern/lock.h | |
parent | 8259090d7394b667fbca4d4b05153e980a39db6b (diff) | |
download | gnumach-bdc9b8583e6336bb3a44a80f10bac8b7b369719c.tar.gz gnumach-bdc9b8583e6336bb3a44a80f10bac8b7b369719c.tar.bz2 gnumach-bdc9b8583e6336bb3a44a80f10bac8b7b369719c.zip |
kern: disable the simple lock checks while debugging
* kern/lock.c (do_check_simple_locks): New variable.
(check_simple_locks): Make check conditional.
(check_simple_locks_{en,dis}able): New functions.
* kern/lock.h (check_simple_locks_{en,dis}able): New declarations.
* ddb/db_trap.c (db_task_trap): Disable simple lock checks.
Diffstat (limited to 'kern/lock.h')
-rw-r--r-- | kern/lock.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kern/lock.h b/kern/lock.h index 435ee1dd..0eba0ad1 100644 --- a/kern/lock.h +++ b/kern/lock.h @@ -81,6 +81,8 @@ class simple_lock_data_t name; #define simple_lock_taken(lock) (simple_lock_assert(lock), \ 1) /* always succeeds */ #define check_simple_locks() +#define check_simple_locks_enable() +#define check_simple_locks_disable() #else /* NCPUS > 1 */ /* @@ -97,6 +99,8 @@ extern boolean_t simple_lock_try(simple_lock_t); (lock)->lock_data) extern void check_simple_locks(void); +extern void check_simple_locks_enable(void); +extern void check_simple_locks_disable(void); #endif /* NCPUS > 1 */ @@ -121,6 +125,8 @@ class struct simple_lock_data_empty name; #define simple_lock_taken(l) (simple_lock_assert(l), \ 1) /* always succeeds */ #define check_simple_locks() +#define check_simple_locks_enable() +#define check_simple_locks_disable() #define simple_lock_pause() #endif /* MACH_SLOCKS */ |