generic-rt: remove use of core instrinsics
Fixes warning about not using compiler intrinsics. Calls into the `panic` macro instead of directly calling the `abort` intrinsic. Slightly changes the behavior of the function by printing the panic message, unwinding, and aborting.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#![no_std]
|
||||
#![feature(core_intrinsics)]
|
||||
|
||||
use core::{
|
||||
arch::asm,
|
||||
@@ -92,10 +91,8 @@ impl<Os> GenericTcb<Os> {
|
||||
Some(&mut *Self::current_ptr()?)
|
||||
}
|
||||
}
|
||||
pub fn panic_notls(_msg: impl core::fmt::Display) -> ! {
|
||||
//eprintln!("panicked in ld.so: {}", msg);
|
||||
|
||||
core::intrinsics::abort();
|
||||
pub fn panic_notls(msg: impl core::fmt::Display) -> ! {
|
||||
panic!("panicked in ld.so: {msg}");
|
||||
}
|
||||
|
||||
pub trait ExpectTlsFree {
|
||||
|
||||
Reference in New Issue
Block a user