Fixed race condition on hashtable n_readers field

This commit is contained in:
Mark Riddoch
2014-12-19 15:54:05 +00:00
parent c33e17db31
commit 3e37f0d0f6

View File

@ -503,7 +503,7 @@ hashtable_read_lock(HASHTABLE *table)
;
spinlock_acquire(&table->spin);
}
table->n_readers++;
atomic_add(&table->n_readers, 1);
spinlock_release(&table->spin);
}