diff options
| author | mark <markm@cs.wisc.edu> | 2020-06-11 21:31:49 -0500 |
|---|---|---|
| committer | mark <markm@cs.wisc.edu> | 2020-07-27 19:51:13 -0500 |
| commit | 2c31b45ae878b821975c4ebd94cc1e49f6073fd0 (patch) | |
| tree | 14f64e683e3f64dcbcfb8c2c7cb45ac7592e6e09 /library/std/src/os/fortanix_sgx/mod.rs | |
| parent | 9be8ffcb0206fc1558069a7b4766090df7877659 (diff) | |
| download | rust-2c31b45ae878b821975c4ebd94cc1e49f6073fd0.tar.gz rust-2c31b45ae878b821975c4ebd94cc1e49f6073fd0.zip | |
mv std libs to library/
Diffstat (limited to 'library/std/src/os/fortanix_sgx/mod.rs')
| -rw-r--r-- | library/std/src/os/fortanix_sgx/mod.rs | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/library/std/src/os/fortanix_sgx/mod.rs b/library/std/src/os/fortanix_sgx/mod.rs new file mode 100644 index 00000000000..69923268e57 --- /dev/null +++ b/library/std/src/os/fortanix_sgx/mod.rs @@ -0,0 +1,51 @@ +//! Functionality specific to the `x86_64-fortanix-unknown-sgx` target. +//! +//! This includes functions to deal with memory isolation, usercalls, and the +//! SGX instruction set. + +#![deny(missing_docs, missing_debug_implementations)] +#![unstable(feature = "sgx_platform", issue = "56975")] + +/// Low-level interfaces to usercalls. See the [ABI documentation] for more +/// information. +/// +/// [ABI documentation]: https://docs.rs/fortanix-sgx-abi/ +pub mod usercalls { + pub use crate::sys::abi::usercalls::*; + + /// Primitives for allocating memory in userspace as well as copying data + /// to and from user memory. + pub mod alloc { + pub use crate::sys::abi::usercalls::alloc::*; + } + + /// Lowest-level interfaces to usercalls and usercall ABI type definitions. + pub mod raw { + pub use crate::sys::abi::usercalls::raw::{ + accept_stream, alloc, async_queues, bind_stream, close, connect_stream, exit, flush, + free, insecure_time, launch_thread, read, read_alloc, send, wait, write, + }; + pub use crate::sys::abi::usercalls::raw::{do_usercall, Usercalls as UsercallNrs}; + + // fortanix-sgx-abi re-exports + pub use crate::sys::abi::usercalls::raw::Error; + pub use crate::sys::abi::usercalls::raw::{ByteBuffer, FifoDescriptor, Return, Usercall}; + pub use crate::sys::abi::usercalls::raw::{Fd, Result, Tcs}; + pub use crate::sys::abi::usercalls::raw::{ + EV_RETURNQ_NOT_EMPTY, EV_UNPARK, EV_USERCALLQ_NOT_FULL, FD_STDERR, FD_STDIN, FD_STDOUT, + RESULT_SUCCESS, USERCALL_USER_DEFINED, WAIT_INDEFINITE, WAIT_NO, + }; + } +} + +/// Functions for querying mapping information for pointers. +pub mod mem { + pub use crate::sys::abi::mem::*; +} + +pub use crate::sys::ext::{arch, ffi, io}; + +/// Functions for querying thread-related information. +pub mod thread { + pub use crate::sys::abi::thread::current; +} |
