summaryrefslogtreecommitdiff
path: root/src/sync.rs
diff options
context:
space:
mode:
authorChristian Cunningham <c@localhost>2022-08-26 18:23:09 -0700
committerChristian Cunningham <c@localhost>2022-08-26 18:23:09 -0700
commit44b2a2741efe1ac0503f71e53b4f13359f8e7a9a (patch)
treeb994e73167b2f8233176919d1da2b64e7f3f80e5 /src/sync.rs
parentc649f061c72af454199c5a2a9148c4867703da80 (diff)
Atomic ordering
Diffstat (limited to 'src/sync.rs')
-rw-r--r--src/sync.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sync.rs b/src/sync.rs
index 18fc912..f13f415 100644
--- a/src/sync.rs
+++ b/src/sync.rs
@@ -123,7 +123,7 @@ impl<T> interface::Mutex for SpinLock<T> {
loop {
// Loop until acquired the lock
match self.lock
- .compare_exchange(false, true, Ordering::Acquire, Ordering::Relaxed)
+ .compare_exchange(false, true, Ordering::Acquire, Ordering::Acquire)
{
Ok(_) => { break; }
_ => {}