diff options
| author | bors <bors@rust-lang.org> | 2021-05-07 16:24:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-07 16:24:46 +0000 |
| commit | ca712bc4255cd0912e00ec2eee5b6a547385c2b0 (patch) | |
| tree | ff4d9ea888df4811d26c260f8bd532d901c016df /library/std/src/sys/sgx | |
| parent | e5f83d24aee866a14753a7cedbb4e301dfe5bef5 (diff) | |
| parent | 42848090b588a53bc31cfe3718090f488a69633e (diff) | |
| download | rust-ca712bc4255cd0912e00ec2eee5b6a547385c2b0.tar.gz rust-ca712bc4255cd0912e00ec2eee5b6a547385c2b0.zip | |
Auto merge of #85036 - Dylan-DPC:rollup-4qfabo3, r=Dylan-DPC
Rollup of 9 pull requests Successful merges: - #84254 (illumos should put libc last in library search order) - #84442 (Unify rustc and rustdoc parsing of `cfg()`) - #84655 (Cleanup of `wasm`) - #84866 (linker: Avoid library duplication with `/WHOLEARCHIVE`) - #84930 (rename LLVM target for RustyHermit) - #84991 (rustc: Support Rust-specific features in -Ctarget-feature) - #85029 (SGX mutex is movable) - #85030 (Rearrange SGX split module files) - #85033 (some further small cleanups) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys/sgx')
| -rw-r--r-- | library/std/src/sys/sgx/abi/tls/mod.rs (renamed from library/std/src/sys/sgx/abi/tls.rs) | 0 | ||||
| -rw-r--r-- | library/std/src/sys/sgx/mutex.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/sgx/waitqueue/mod.rs (renamed from library/std/src/sys/sgx/waitqueue.rs) | 7 | ||||
| -rw-r--r-- | library/std/src/sys/sgx/waitqueue/spin_mutex.rs | 3 | ||||
| -rw-r--r-- | library/std/src/sys/sgx/waitqueue/unsafe_list.rs | 3 |
5 files changed, 8 insertions, 7 deletions
diff --git a/library/std/src/sys/sgx/abi/tls.rs b/library/std/src/sys/sgx/abi/tls/mod.rs index 13d96e9a633..13d96e9a633 100644 --- a/library/std/src/sys/sgx/abi/tls.rs +++ b/library/std/src/sys/sgx/abi/tls/mod.rs diff --git a/library/std/src/sys/sgx/mutex.rs b/library/std/src/sys/sgx/mutex.rs index 8874517dac6..1b5ced4178f 100644 --- a/library/std/src/sys/sgx/mutex.rs +++ b/library/std/src/sys/sgx/mutex.rs @@ -8,7 +8,7 @@ pub struct Mutex { inner: SpinMutex<WaitVariable<bool>>, } -pub type MovableMutex = Box<Mutex>; +pub type MovableMutex = Mutex; // Implementation according to “Operating Systems: Three Easy Pieces”, chapter 28 impl Mutex { diff --git a/library/std/src/sys/sgx/waitqueue.rs b/library/std/src/sys/sgx/waitqueue/mod.rs index e464dc3ee9d..61bb11d9a6f 100644 --- a/library/std/src/sys/sgx/waitqueue.rs +++ b/library/std/src/sys/sgx/waitqueue/mod.rs @@ -13,13 +13,8 @@ #[cfg(test)] mod tests; -/// A doubly-linked list where callers are in charge of memory allocation -/// of the nodes in the list. -mod unsafe_list; - -/// Trivial spinlock-based implementation of `sync::Mutex`. -// FIXME: Perhaps use Intel TSX to avoid locking? mod spin_mutex; +mod unsafe_list; use crate::num::NonZeroUsize; use crate::ops::{Deref, DerefMut}; diff --git a/library/std/src/sys/sgx/waitqueue/spin_mutex.rs b/library/std/src/sys/sgx/waitqueue/spin_mutex.rs index 7f1a671bab4..f6e851ccadd 100644 --- a/library/std/src/sys/sgx/waitqueue/spin_mutex.rs +++ b/library/std/src/sys/sgx/waitqueue/spin_mutex.rs @@ -1,3 +1,6 @@ +//! Trivial spinlock-based implementation of `sync::Mutex`. +// FIXME: Perhaps use Intel TSX to avoid locking? + #[cfg(test)] mod tests; diff --git a/library/std/src/sys/sgx/waitqueue/unsafe_list.rs b/library/std/src/sys/sgx/waitqueue/unsafe_list.rs index 0834d2593fc..cf2f0886c15 100644 --- a/library/std/src/sys/sgx/waitqueue/unsafe_list.rs +++ b/library/std/src/sys/sgx/waitqueue/unsafe_list.rs @@ -1,3 +1,6 @@ +//! A doubly-linked list where callers are in charge of memory allocation +//! of the nodes in the list. + #[cfg(test)] mod tests; |
