1 //! Functionality specific to the `x86_64-fortanix-unknown-sgx` target.
3 //! This includes functions to deal with memory isolation, usercalls, and the
4 //! SGX instruction set.
7 #![unstable(feature = "sgx_platform", issue = "56975")]
9 /// Low-level interfaces to usercalls. See the [ABI documentation] for more
12 /// [ABI documentation]: https://docs.rs/fortanix-sgx-abi/
14 pub use crate::sys::abi::usercalls::*;
16 /// Primitives for allocating memory in userspace as well as copying data
17 /// to and from user memory.
19 pub use crate::sys::abi::usercalls::alloc::*;
22 /// Lowest-level interfaces to usercalls and usercall ABI type definitions.
24 pub use crate::sys::abi::usercalls::raw::{
25 accept_stream, alloc, async_queues, bind_stream, close, connect_stream, exit, flush,
26 free, insecure_time, launch_thread, read, read_alloc, send, wait, write,
28 pub use crate::sys::abi::usercalls::raw::{do_usercall, Usercalls as UsercallNrs};
30 // fortanix-sgx-abi re-exports
31 pub use crate::sys::abi::usercalls::raw::Error;
32 pub use crate::sys::abi::usercalls::raw::{ByteBuffer, FifoDescriptor, Return, Usercall};
33 pub use crate::sys::abi::usercalls::raw::{Fd, Result, Tcs};
34 pub use crate::sys::abi::usercalls::raw::{
35 EV_RETURNQ_NOT_EMPTY, EV_UNPARK, EV_USERCALLQ_NOT_FULL, FD_STDERR, FD_STDIN, FD_STDOUT,
36 RESULT_SUCCESS, USERCALL_USER_DEFINED, WAIT_INDEFINITE, WAIT_NO,
41 /// Functions for querying mapping information for pointers.
43 pub use crate::sys::abi::mem::*;
50 /// Functions for querying thread-related information.
52 pub use crate::sys::abi::thread::current;