Skip to content

Commit

Permalink
box mutex to get a movable mutex
Browse files Browse the repository at this point in the history
the commit avoid an alignement issue in Mutex implementation
  • Loading branch information
stlankes committed Oct 13, 2020
1 parent 77d9831 commit bf268fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/hermit/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pub struct Mutex {
inner: Spinlock<MutexInner>,
}

pub type MovableMutex = Mutex;
pub type MovableMutex = Box<Mutex>;

unsafe impl Send for Mutex {}
unsafe impl Sync for Mutex {}
Expand Down

0 comments on commit bf268fe

Please sign in to comment.