terminate: Fix coutning of non-leader threads

Change-Id: I8399ad553bb8e09bef508ac976e8cd56cdae8013
This commit is contained in:
Masamichi Takagi
2018-09-02 17:02:17 +09:00
parent 0b0b7b03d7
commit be635ceb19

View File

@ -1053,7 +1053,9 @@ void terminate(int rc, int sig)
mcs_rwlock_reader_lock(&proc->threads_lock, &lock);
n = 0;
list_for_each_entry(thread, &proc->threads_list, siblings_list) {
n++;
if (thread != mythread) {
n++;
}
}
if (n) {