diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/processor.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/arch/processor.c b/src/arch/processor.c index c08e8da..5c4f864 100644 --- a/src/arch/processor.c +++ b/src/arch/processor.c @@ -131,14 +131,14 @@ static void g_arch_processor_class_init(GArchProcessorClass *klass) static void g_arch_processor_init(GArchProcessor *proc) { g_mutex_init(&proc->mutex); -#ifndef DEBUG +#ifndef NDEBUG g_atomic_int_set(&proc->locked, 0); #endif proc->errors = NULL; proc->error_count = 0; g_mutex_init(&proc->error_mutex); -#ifndef DEBUG +#ifndef NDEBUG g_atomic_int_set(&proc->error_locked, 0); #endif @@ -549,11 +549,15 @@ void g_arch_processor_lock_unlock_errors(GArchProcessor *proc, bool state) if (state) { g_mutex_lock(&proc->error_mutex); +#ifndef NDEBUG g_atomic_int_set(&proc->error_locked, 1); +#endif } else { +#ifndef NDEBUG g_atomic_int_set(&proc->error_locked, 0); +#endif g_mutex_unlock(&proc->error_mutex); } |