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

Optimise write lock release

parent 63dce352
......@@ -122,11 +122,8 @@
}
void unwlock() {
uint32_t prev_readers = _readers;
if (prev_readers == HAS_WRITER) {
_readers.compare_exchange_weak(prev_readers, 0);
}
return;
uint32_t prev_readers = HAS_WRITER;
_readers.compare_exchange_weak(prev_readers, 0);
}
};
......
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