aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mem_pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mem_pool.c b/src/mem_pool.c
index 4261e9f8d..e034ea652 100644
--- a/src/mem_pool.c
+++ b/src/mem_pool.c
@@ -508,7 +508,7 @@ void
memory_pool_unlock_mutex (memory_pool_mutex_t *mutex)
{
mutex->owner = 0;
- (void)g_atomic_int_dec_and_test (&mutex->lock);
+ (void)g_atomic_int_compare_and_exchange (&mutex->lock, 1, 0);
}
memory_pool_rwlock_t*