Make thread kill API async.

This commit is contained in:
4lDO2
2025-02-26 23:54:14 +01:00
parent f40ec48b3e
commit 7b06ca16b1
2 changed files with 23 additions and 34 deletions
-11
View File
@@ -69,17 +69,6 @@ pub fn exit_this_context() -> ! {
unreachable!();
}
pub fn wait_for_exit(context_lock: Arc<RwSpinlock<Context>>) {
{
let mut ctxt = context_lock.write();
ctxt.status = context::Status::Runnable;
ctxt.being_sigkilled = true;
}
while !matches!(context_lock.read().status, context::Status::Dead) {
context::switch();
}
}
pub fn send_signal(
context: Arc<RwLock<Context>>,
sig: usize,