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:
}
// check entry is being called according to ABI
- assert_eq!(p3, 0);
- assert_eq!(p4, 0);
- assert_eq!(p5, 0);
+ rtassert!(p3 == 0);
+ rtassert!(p4 == 0);
+ rtassert!(p5 == 0);
unsafe {
// The actual types of these arguments are `p1: *const Arg, p2:
}
usercalls::exit(code != 0);
}
+
+#[cfg(not(test))]
+#[no_mangle]
+extern "C" fn abort_reentry() -> ! {
+ usercalls::exit(false)
+}