Downgrade context sigcontrol to read
This commit is contained in:
@@ -453,12 +453,11 @@ impl Context {
|
||||
let kstack = self.kstack.as_ref()?;
|
||||
Some(unsafe { &mut *kstack.initial_top().sub(size_of::<InterruptStack>()).cast() })
|
||||
}
|
||||
pub fn sigcontrol(&mut self) -> Option<(&Sigcontrol, &SigProcControl, &mut SignalState)> {
|
||||
Some(Self::sigcontrol_raw(self.sig.as_mut()?))
|
||||
pub fn sigcontrol(&self) -> Option<(&Sigcontrol, &SigProcControl, &SignalState)> {
|
||||
let (for_thread, for_proc) = Self::sigcontrol_raw(self.sig.as_ref()?);
|
||||
Some((for_thread, for_proc, self.sig.as_ref()?))
|
||||
}
|
||||
pub fn sigcontrol_raw(
|
||||
sig: &mut SignalState,
|
||||
) -> (&Sigcontrol, &SigProcControl, &mut SignalState) {
|
||||
pub fn sigcontrol_raw(sig: &SignalState) -> (&Sigcontrol, &SigProcControl) {
|
||||
let check = |off| {
|
||||
assert_eq!(usize::from(off) % align_of::<usize>(), 0);
|
||||
assert!(usize::from(off).saturating_add(size_of::<Sigcontrol>()) < PAGE_SIZE);
|
||||
@@ -475,7 +474,7 @@ impl Context {
|
||||
.byte_add(usize::from(sig.procctl_off))
|
||||
};
|
||||
|
||||
(for_thread, for_proc, sig)
|
||||
(for_thread, for_proc)
|
||||
}
|
||||
pub fn caller_ctx(&self) -> CallerCtx {
|
||||
CallerCtx {
|
||||
|
||||
Reference in New Issue
Block a user