diff options
| author | bors <bors@rust-lang.org> | 2019-02-03 04:57:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-02-03 04:57:30 +0000 |
| commit | 2966fbc10d0fd4fe15a25608b9eca3e52ba24995 (patch) | |
| tree | 26cb31afc5d4d999df7d3881f4688d93017c0520 /src/libstd/os | |
| parent | ec7ecb3076260256ae7e43f6991ecc1566c73708 (diff) | |
| parent | a90b23fd30cce3f83b9c1771bab31c1964ce2fe2 (diff) | |
| download | rust-2966fbc10d0fd4fe15a25608b9eca3e52ba24995.tar.gz rust-2966fbc10d0fd4fe15a25608b9eca3e52ba24995.zip | |
Auto merge of #58043 - jethrogb:jb/sgx-usercallnrs, r=joshtriplett
Fix `std::os::fortanix_sgx::usercalls::raw::UsercallNrs` It was 0-indexed but should be 1-indexed. This PR just removes the duplicate code and re-exports the internal enum. Fixes https://github.com/fortanix/rust-sgx/issues/88 r? @joshtriplett
Diffstat (limited to 'src/libstd/os')
| -rw-r--r-- | src/libstd/os/fortanix_sgx/mod.rs | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/libstd/os/fortanix_sgx/mod.rs b/src/libstd/os/fortanix_sgx/mod.rs index 810965fc1b8..c6106b9f827 100644 --- a/src/libstd/os/fortanix_sgx/mod.rs +++ b/src/libstd/os/fortanix_sgx/mod.rs @@ -21,26 +21,11 @@ pub mod usercalls { /// Lowest-level interfaces to usercalls and usercall ABI type definitions. pub mod raw { - use sys::abi::usercalls::raw::invoke_with_usercalls; - pub use sys::abi::usercalls::raw::do_usercall; + pub use sys::abi::usercalls::raw::{do_usercall, Usercalls as UsercallNrs}; pub use 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}; - macro_rules! define_usercallnrs { - ($(fn $f:ident($($n:ident: $t:ty),*) $(-> $r:ty)*; )*) => { - /// Usercall numbers as per the ABI. - #[repr(C)] - #[unstable(feature = "sgx_platform", issue = "56975")] - #[derive(Copy, Clone, Hash, PartialEq, Eq, Debug)] - #[allow(missing_docs)] - pub enum UsercallNrs { - $($f,)* - } - }; - } - invoke_with_usercalls!(define_usercallnrs); - // fortanix-sgx-abi re-exports pub use sys::abi::usercalls::raw::{ByteBuffer, FifoDescriptor, Return, Usercall}; pub use sys::abi::usercalls::raw::Error; |
