std::atomic doesn't need volatile
This commit is contained in:
parent
ef164561c1
commit
2cef0d541c
1 changed files with 4 additions and 4 deletions
|
@ -74,9 +74,9 @@ public:
|
||||||
SharedSpinLock(const SharedSpinLock&) = delete;
|
SharedSpinLock(const SharedSpinLock&) = delete;
|
||||||
SharedSpinLock& operator=(const SharedSpinLock&) = delete;
|
SharedSpinLock& operator=(const SharedSpinLock&) = delete;
|
||||||
|
|
||||||
// Disallow move.
|
// Enable move.
|
||||||
SharedSpinLock(SharedSpinLock&&) = delete;
|
SharedSpinLock(SharedSpinLock&&) = default;
|
||||||
SharedSpinLock& operator=(SharedSpinLock&&) = delete;
|
SharedSpinLock& operator=(SharedSpinLock&&) = default;
|
||||||
|
|
||||||
LockObj<false> spin_read_lock();
|
LockObj<false> spin_read_lock();
|
||||||
LockObj<false> try_spin_read_lock();
|
LockObj<false> try_spin_read_lock();
|
||||||
|
@ -98,7 +98,7 @@ private:
|
||||||
Weak selfWeakPtr;
|
Weak selfWeakPtr;
|
||||||
|
|
||||||
/// Used to lock the read/write member variables.
|
/// Used to lock the read/write member variables.
|
||||||
volatile std::atomic_bool spinLock;
|
std::atomic_bool spinLock;
|
||||||
|
|
||||||
unsigned int read;
|
unsigned int read;
|
||||||
bool write;
|
bool write;
|
||||||
|
|
Loading…
Reference in a new issue