about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorJethro Beekman <jethro@fortanix.com>2021-05-07 13:40:43 +0200
committerJethro Beekman <jethro@fortanix.com>2021-05-07 13:55:03 +0200
commitbfa84842e546a5fb2d1c69ba499ddc94bee1e01a (patch)
tree6f139af6fcd62774e43a769664e2be98579d51a2 /library/std/src/sys
parentac888e8675182c703c2cd097957878faf88dad94 (diff)
downloadrust-bfa84842e546a5fb2d1c69ba499ddc94bee1e01a.tar.gz
rust-bfa84842e546a5fb2d1c69ba499ddc94bee1e01a.zip
Rearrange SGX split module files
In #75979 several inlined modules were split out into multiple files.
This PR keeps the multiple files but moves a few things around to
organize things in a coherent way.
Diffstat (limited to 'library/std/src/sys')
-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/waitqueue/mod.rs (renamed from library/std/src/sys/sgx/waitqueue.rs)7
-rw-r--r--library/std/src/sys/sgx/waitqueue/spin_mutex.rs3
-rw-r--r--library/std/src/sys/sgx/waitqueue/unsafe_list.rs3
4 files changed, 7 insertions, 6 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/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;