Commit 1b4106fa authored by Xavier Thompson's avatar Xavier Thompson

Optimise write lock release

parent 63dce352
...@@ -122,11 +122,8 @@ ...@@ -122,11 +122,8 @@
} }
void unwlock() { void unwlock() {
uint32_t prev_readers = _readers; uint32_t prev_readers = HAS_WRITER;
if (prev_readers == HAS_WRITER) { _readers.compare_exchange_weak(prev_readers, 0);
_readers.compare_exchange_weak(prev_readers, 0);
}
return;
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment