mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-02 07:28:21 +00:00
signal: fix lock release order
This commit is contained in:
@@ -350,9 +350,9 @@ void signal_signalproc(struct proc_t *proc, int signal) {
|
|||||||
// XXX possible race condition where a thread will change the process mask or the action of stopping signals
|
// XXX possible race condition where a thread will change the process mask or the action of stopping signals
|
||||||
// after it was sent to everyone
|
// after it was sent to everyone
|
||||||
if ((shouldstop || signal == SIGCONT) == false) {
|
if ((shouldstop || signal == SIGCONT) == false) {
|
||||||
|
spinlock_release(&proc->threadlistlock);
|
||||||
THREAD_LEAVE(thread);
|
THREAD_LEAVE(thread);
|
||||||
PROCESS_LEAVE(proc);
|
PROCESS_LEAVE(proc);
|
||||||
spinlock_release(&proc->threadlistlock);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user