Fix bug causing raise() to not deliver any signals.
This commit is contained in:
Generated
+1
-1
@@ -226,7 +226,7 @@ checksum = "64072665120942deff5fd5425d6c1811b854f4939e7f1c01ce755f64432bbea7"
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.5.1"
|
||||
version = "0.5.2"
|
||||
dependencies = [
|
||||
"bitflags 2.4.2",
|
||||
]
|
||||
|
||||
@@ -100,7 +100,6 @@ pub fn signal_handler() {
|
||||
thread_ctl.saved_scratch_b.set(scratch_b);
|
||||
|
||||
thread_ctl.control_flags.store((control_flags | SigcontrolFlags::INHIBIT_DELIVERY).bits(), Ordering::Release);
|
||||
log::info!("delivering");
|
||||
}
|
||||
pub fn excp_handler(signal: usize) {
|
||||
let current = context::current().expect("CPU exception but not inside of context!");
|
||||
|
||||
@@ -6,8 +6,7 @@ use rmm::Arch;
|
||||
use spin::RwLock;
|
||||
|
||||
use crate::context::{
|
||||
memory::{AddrSpace, PageSpan, Grant},
|
||||
ContextId, WaitpidKey,
|
||||
memory::{AddrSpace, Grant, PageSpan}, switch::SwitchResult, ContextId, WaitpidKey
|
||||
};
|
||||
|
||||
use crate::{
|
||||
@@ -251,7 +250,9 @@ pub fn kill(pid: ContextId, sig: usize) -> Result<usize> {
|
||||
Err(Error::new(EPERM))
|
||||
} else {
|
||||
// Switch to ensure delivery to self
|
||||
context::switch();
|
||||
if let SwitchResult::Switched { signal: true } = context::switch() {
|
||||
context::signal::signal_handler();
|
||||
}
|
||||
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
+1
-1
Submodule syscall updated: bd60d67729...bf01feb121
Reference in New Issue
Block a user