Fixed race condition on hashtable n_readers field
This commit is contained in:
@ -503,7 +503,7 @@ hashtable_read_lock(HASHTABLE *table)
|
|||||||
;
|
;
|
||||||
spinlock_acquire(&table->spin);
|
spinlock_acquire(&table->spin);
|
||||||
}
|
}
|
||||||
table->n_readers++;
|
atomic_add(&table->n_readers, 1);
|
||||||
spinlock_release(&table->spin);
|
spinlock_release(&table->spin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user