We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 986c1fc commit d6e955fCopy full SHA for d6e955f
library/std/src/sys/hermit/mutex.rs
@@ -35,7 +35,11 @@ struct SpinlockGuard<'a, T: ?Sized + 'a> {
35
36
impl<T> Spinlock<T> {
37
pub const fn new(user_data: T) -> Spinlock<T> {
38
- SpinlockGuard { dequeue: &self.dequeue, data: &mut *self.data.get() }
+ Spinlock {
39
+ queue: AtomicUsize::new(0),
40
+ dequeue: AtomicUsize::new(1),
41
+ data: UnsafeCell::new(user_data),
42
+ }
43
}
44
45
#[inline]
0 commit comments