redox-rt: clean up unused code
Removes unused imports, and replaces calls to `core::intrinsics::abort` with `panic` macro call.
This commit is contained in:
+10
-17
@@ -1,16 +1,9 @@
|
||||
#![no_std]
|
||||
#![feature(
|
||||
asm_const,
|
||||
core_intrinsics,
|
||||
int_roundings,
|
||||
let_chains,
|
||||
slice_ptr_get,
|
||||
sync_unsafe_cell
|
||||
)]
|
||||
#![feature(int_roundings, let_chains, slice_ptr_get, sync_unsafe_cell)]
|
||||
#![forbid(unreachable_patterns)]
|
||||
|
||||
use core::{
|
||||
cell::{SyncUnsafeCell, UnsafeCell},
|
||||
cell::UnsafeCell,
|
||||
mem::{size_of, MaybeUninit},
|
||||
};
|
||||
|
||||
@@ -232,14 +225,14 @@ pub(crate) struct StaticProcInfo {
|
||||
proc_fd: MaybeUninit<FdGuard>,
|
||||
has_proc_fd: bool,
|
||||
}
|
||||
struct DynamicProcInfo {
|
||||
pgid: u32,
|
||||
euid: u32,
|
||||
suid: u32,
|
||||
ruid: u32,
|
||||
egid: u32,
|
||||
rgid: u32,
|
||||
sgid: u32,
|
||||
pub struct DynamicProcInfo {
|
||||
pub pgid: u32,
|
||||
pub euid: u32,
|
||||
pub suid: u32,
|
||||
pub ruid: u32,
|
||||
pub egid: u32,
|
||||
pub rgid: u32,
|
||||
pub sgid: u32,
|
||||
}
|
||||
|
||||
static DYNAMIC_PROC_INFO: Mutex<DynamicProcInfo> = Mutex::new(DynamicProcInfo {
|
||||
|
||||
@@ -172,7 +172,7 @@ unsafe fn inner(stack: &mut SigStack) {
|
||||
CallFlags::empty(),
|
||||
&[ProcCall::Exit as u64, u64::from(sig) << 8],
|
||||
);
|
||||
core::intrinsics::abort()
|
||||
panic!()
|
||||
}
|
||||
SigactionKind::Handled { handler } => handler,
|
||||
};
|
||||
|
||||
+1
-1
@@ -324,7 +324,7 @@ pub fn posix_exit(status: i32) -> ! {
|
||||
)
|
||||
.expect("failed to call proc mgr with Exit");
|
||||
let _ = syscall::write(1, b"redox-rt: ProcCall::Exit FAILED, abort()ing!\n");
|
||||
core::intrinsics::abort();
|
||||
panic!();
|
||||
}
|
||||
pub fn setrens(rns: usize, ens: usize) -> Result<()> {
|
||||
this_proc_call(
|
||||
|
||||
Reference in New Issue
Block a user