mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-24 13:43:04 +00:00
Rollup merge of #87507 - jethrogb:jb/sgx-unmoveable-mutex, r=dtolnay
SGX mutex is *not* moveable Reverts the erroneous change in #85029.
This commit is contained in:
commit
8bc7ec1316
@ -8,7 +8,8 @@ pub struct Mutex {
|
||||
inner: SpinMutex<WaitVariable<bool>>,
|
||||
}
|
||||
|
||||
pub type MovableMutex = Mutex;
|
||||
// not movable: see UnsafeList implementation
|
||||
pub type MovableMutex = Box<Mutex>;
|
||||
|
||||
// Implementation according to “Operating Systems: Three Easy Pieces”, chapter 28
|
||||
impl Mutex {
|
||||
|
@ -23,6 +23,7 @@ impl<T> UnsafeListEntry<T> {
|
||||
}
|
||||
}
|
||||
|
||||
// WARNING: self-referential struct!
|
||||
pub struct UnsafeList<T> {
|
||||
head_tail: NonNull<UnsafeListEntry<T>>,
|
||||
head_tail_entry: Option<UnsafeListEntry<T>>,
|
||||
|
Loading…
Reference in New Issue
Block a user