More safety for spinlock

This commit is contained in:
Baptiste Wicht 2016-06-30 20:59:52 +02:00
parent 3df6abb169
commit 1ea3f90f4e

View File

@ -15,6 +15,7 @@ private:
public:
void acquire(){
while(!__sync_bool_compare_and_swap(&lock, 0, 1));
__sync_synchronize();
}
void release(){