fix dead locking when kill subthreads
This commit is contained in:
@ -598,6 +598,7 @@ terminate(int rc, int sig)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mcs_rwlock_reader_unlock(&proc->threads_lock, &lock);
|
||||||
if(ids){
|
if(ids){
|
||||||
for(i = 0; i < n; i++){
|
for(i = 0; i < n; i++){
|
||||||
do_kill(mythread, proc->pid, ids[i], SIGKILL, NULL, 0);
|
do_kill(mythread, proc->pid, ids[i], SIGKILL, NULL, 0);
|
||||||
@ -605,7 +606,6 @@ terminate(int rc, int sig)
|
|||||||
kfree(ids);
|
kfree(ids);
|
||||||
ids = NULL;
|
ids = NULL;
|
||||||
}
|
}
|
||||||
mcs_rwlock_reader_unlock(&proc->threads_lock, &lock);
|
|
||||||
|
|
||||||
for(;;){
|
for(;;){
|
||||||
__mcs_rwlock_reader_lock(&proc->threads_lock, &lock);
|
__mcs_rwlock_reader_lock(&proc->threads_lock, &lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user