diff options
Diffstat (limited to 'src/format')
-rw-r--r-- | src/format/format.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/format/format.c b/src/format/format.c index 88367f6..89db51d 100644 --- a/src/format/format.c +++ b/src/format/format.c @@ -116,14 +116,14 @@ static void g_binary_format_init(GBinFormat *format) format->info = g_preload_info_new(); g_rw_lock_init(&format->syms_lock); -#ifndef DEBUG +#ifndef NDEBUG g_atomic_int_set(&format->sym_locked, 0); #endif format->errors = NULL; format->error_count = 0; g_mutex_init(&format->error_mutex); -#ifndef DEBUG +#ifndef NDEBUG g_atomic_int_set(&format->error_locked, 0); #endif @@ -1375,11 +1375,15 @@ void g_binary_format_lock_unlock_errors(GBinFormat *format, bool state) if (state) { g_mutex_lock(&format->error_mutex); +#ifndef NDEBUG g_atomic_int_set(&format->error_locked, 1); +#endif } else { +#ifndef NDEBUG g_atomic_int_set(&format->error_locked, 0); +#endif g_mutex_unlock(&format->error_mutex); } |