| ... | @@ -1577,11 +1577,11 @@ pub const Mutex = extern struct { | ... | @@ -1577,11 +1577,11 @@ pub const Mutex = extern struct { |
| 1577 | }; | 1577 | }; |
| 1578 | | 1578 | |
| 1579 | pub fn tryLock(m: *Mutex) bool { | 1579 | pub fn tryLock(m: *Mutex) bool { |
| 1580 | return m.state.cmpxchgWeak(.unlocked, .locked_once, .acquire, .monotonic) == null; | 1580 | return m.state.cmpxchgStrong(.unlocked, .locked_once, .acquire, .monotonic) == null; |
| 1581 | } | 1581 | } |
| 1582 | | 1582 | |
| 1583 | pub fn lock(m: *Mutex, io: Io) Cancelable!void { | 1583 | pub fn lock(m: *Mutex, io: Io) Cancelable!void { |
| 1584 | const initial_state = m.state.cmpxchgWeak( | 1584 | const initial_state = m.state.cmpxchgStrong( |
| 1585 | .unlocked, | 1585 | .unlocked, |
| 1586 | .locked_once, | 1586 | .locked_once, |
| 1587 | .acquire, | 1587 | .acquire, |
| ... | @@ -1602,7 +1602,7 @@ pub const Mutex = extern struct { | ... | @@ -1602,7 +1602,7 @@ pub const Mutex = extern struct { |
| 1602 | /// | 1602 | /// |
| 1603 | /// For a description of cancelation and cancelation points, see `Future.cancel`. | 1603 | /// For a description of cancelation and cancelation points, see `Future.cancel`. |
| 1604 | pub fn lockUncancelable(m: *Mutex, io: Io) void { | 1604 | pub fn lockUncancelable(m: *Mutex, io: Io) void { |
| 1605 | const initial_state = m.state.cmpxchgWeak( | 1605 | const initial_state = m.state.cmpxchgStrong( |
| 1606 | .unlocked, | 1606 | .unlocked, |
| 1607 | .locked_once, | 1607 | .locked_once, |
| 1608 | .acquire, | 1608 | .acquire, |