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/sys | |
| 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/sys')
| -rw-r--r-- | src/libstd/sys/sgx/abi/usercalls/raw.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libstd/sys/sgx/abi/usercalls/raw.rs b/src/libstd/sys/sgx/abi/usercalls/raw.rs index 27aca7c0903..27f780ca224 100644 --- a/src/libstd/sys/sgx/abi/usercalls/raw.rs +++ b/src/libstd/sys/sgx/abi/usercalls/raw.rs @@ -41,10 +41,15 @@ trait ReturnValue { macro_rules! define_usercalls { // Using `$r:tt` because `$r:ty` doesn't match ! in `clobber_diverging` ($(fn $f:ident($($n:ident: $t:ty),*) $(-> $r:tt)*; )*) => { - #[repr(C)] - #[allow(non_camel_case_types)] - enum Usercalls { - __enclave_usercalls_invalid, + /// Usercall numbers as per the ABI. + #[repr(u64)] + #[unstable(feature = "sgx_platform", issue = "56975")] + #[derive(Copy, Clone, Hash, PartialEq, Eq, Debug)] + #[allow(missing_docs, non_camel_case_types)] + #[non_exhaustive] + pub enum Usercalls { + #[doc(hidden)] + __enclave_usercalls_invalid = 0, $($f,)* } |
