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>>,
|
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
|
// Implementation according to “Operating Systems: Three Easy Pieces”, chapter 28
|
||||||
impl Mutex {
|
impl Mutex {
|
||||||
|
@ -23,6 +23,7 @@ impl<T> UnsafeListEntry<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WARNING: self-referential struct!
|
||||||
pub struct UnsafeList<T> {
|
pub struct UnsafeList<T> {
|
||||||
head_tail: NonNull<UnsafeListEntry<T>>,
|
head_tail: NonNull<UnsafeListEntry<T>>,
|
||||||
head_tail_entry: Option<UnsafeListEntry<T>>,
|
head_tail_entry: Option<UnsafeListEntry<T>>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user