mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-13 14:36:37 -04:00
More safety for spinlock
This commit is contained in:
parent
3df6abb169
commit
1ea3f90f4e
@ -15,6 +15,7 @@ private:
|
||||
public:
|
||||
void acquire(){
|
||||
while(!__sync_bool_compare_and_swap(&lock, 0, 1));
|
||||
__sync_synchronize();
|
||||
}
|
||||
|
||||
void release(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user