]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys/sgx/abi/panic.rs
SGX target: simplify usercall internals
[rust.git] / src / libstd / sys / sgx / abi / panic.rs
index d23fa9a9ec6f9783c4c653101d8a22b1bc49f271..b2afacc70b82e504a5925675d12d1473eff03a57 100644 (file)
@@ -1,4 +1,4 @@
-use super::usercalls::alloc::UserRef;
+use super::usercalls::{alloc::UserRef, self};
 use cmp;
 use io::{self, Write};
 use mem;
@@ -52,7 +52,5 @@ fn flush(&mut self) -> io::Result<()> {
 #[no_mangle]
 pub extern "C" fn panic_msg(msg: &str) -> ! {
     let _ = SgxPanicOutput::new().map(|mut out| out.write(msg.as_bytes()));
-    unsafe { usercall_exit(true); }
+    usercalls::exit(true)
 }
-
-extern "C" { pub fn usercall_exit(panic: bool) -> !; }