We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f22dca0 commit 67eabc6Copy full SHA for 67eabc6
src/libstd/os/fortanix_sgx/mod.rs
@@ -43,3 +43,8 @@ pub mod mem {
43
}
44
45
pub use crate::sys::ext::{io, arch, ffi};
46
+
47
+/// Functions for querying thread-related information.
48
+pub mod thread {
49
+ pub use crate::sys::abi::thread::current;
50
+}
src/libstd/sys/sgx/abi/thread.rs
@@ -4,6 +4,7 @@ use fortanix_sgx_abi::Tcs;
4
/// all currently running threads in the enclave, and it is guaranteed to be
5
/// constant for the lifetime of the thread. More specifically for SGX, there
6
/// is a one-to-one correspondence of the ID to the address of the TCS.
7
+#[unstable(feature = "sgx_platform", issue = "56975")]
8
pub fn current() -> Tcs {
9
extern "C" { fn get_tcs_addr() -> Tcs; }
10
unsafe { get_tcs_addr() }
0 commit comments