]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys/sgx/abi/mod.rs
SGX target: change re-entry abort logic
[rust.git] / src / libstd / sys / sgx / abi / mod.rs
index 1f433e25ee16ccf4669f84d6ae2b44e93ecc27be..0f107de83f062c76fbea80edeb6ede41429ee79f 100644 (file)
@@ -29,7 +29,7 @@
     static RELOC_STATE: AtomicUsize = AtomicUsize::new(UNINIT);
 
     if secondary && RELOC_STATE.load(Ordering::Relaxed) != DONE {
-        panic::panic_msg("Entered secondary TCS before main TCS!")
+        rtabort!("Entered secondary TCS before main TCS!")
     }
 
     // Try to atomically swap UNINIT with BUSY. The returned state can be:
@@ -92,3 +92,9 @@ pub(super) fn exit_with_code(code: isize) -> ! {
     }
     usercalls::exit(code != 0);
 }
+
+#[cfg(not(test))]
+#[no_mangle]
+extern "C" fn abort_reentry() -> ! {
+    usercalls::exit(false)
+}