diff --git a/redox-rt/src/arch/x86_64.rs b/redox-rt/src/arch/x86_64.rs index 580fb94655cc7f78acef2b6ab64391b794e21c23..de94685416ba6384020d1b245d737ffc14e9fb14 100644 --- a/redox-rt/src/arch/x86_64.rs +++ b/redox-rt/src/arch/x86_64.rs @@ -5,7 +5,7 @@ use syscall::data::Sigcontrol; use syscall::error::*; use crate::proc::{fork_inner, FdGuard}; -use crate::signal::inner_c; +use crate::signal::{inner_c, RtSigarea}; // Setup a stack starting from the very end of the address space, and then growing downwards. pub(crate) const STACK_TOP: usize = 1 << 47; @@ -231,8 +231,8 @@ asmfunction!(__relibc_internal_sigentry: [" sc_saved_rflags = const offset_of!(Sigcontrol, saved_flags), sc_saved_rip = const offset_of!(Sigcontrol, saved_ip), sc_saved_rsp = const offset_of!(Sigcontrol, saved_sp), - tcb_sa_off = const 0, // FIXME - tcb_sc_off = const 0, // FIXME + tcb_sa_off = const offset_of!(crate::Tcb, os_specific) + offset_of!(RtSigarea, arch), + tcb_sc_off = const offset_of!(crate::Tcb, os_specific) + offset_of!(RtSigarea, control), supports_xsave = sym SUPPORTS_XSAVE, ]); diff --git a/redox-rt/src/lib.rs b/redox-rt/src/lib.rs index 257ea4312972d9aad2e1daa39ef09f235d57808e..84c7eac9eb3ee8c6edf906dfaec9741e32218100 100644 --- a/redox-rt/src/lib.rs +++ b/redox-rt/src/lib.rs @@ -2,6 +2,10 @@ #![feature(asm_const, array_chunks, int_roundings, let_chains, slice_ptr_get, sync_unsafe_cell, thread_local)] #![forbid(unreachable_patterns)] +use generic_rt::GenericTcb; + +use self::signal::RtSigarea; + extern crate alloc; #[macro_export] @@ -33,3 +37,5 @@ pub mod auxv_defs; pub mod signal; pub mod sync; pub mod thread; + +pub type Tcb = GenericTcb<RtSigarea>;