diff --git a/sources/hashmap.c b/sources/hashmap.c index 0096e50f..83d0c9b7 100644 --- a/sources/hashmap.c +++ b/sources/hashmap.c @@ -224,7 +224,7 @@ od_hashmap_elt_t *od_hashmap_lock_key(od_hashmap_t *hm, od_hash_t keyhash, * To avoid intra-machine locks we must yield cpu slice from time to time * even if waiting for other lock. */ - while (!pthread_mutex_trylock(&hm->buckets[bucket_index]->mu)) + while (pthread_mutex_trylock(&hm->buckets[bucket_index]->mu)) machine_sleep(1); od_hashmap_elt_t *ptr = od_bucket_search(hm->buckets[bucket_index],