if (Syscall::tgkill(own_pid, tid, SIGSETXID) < 0) {
err = errno;
if (ESRCH == err) { // thread already gone - noop
+ g_thread_alive[i] = false;
continue;
} else {
abort();
}
}
} else if (ESRCH == err) { // thread already gone - noop
+ g_thread_alive[i] = false;
continue;
} else {
abort();
usleep(SLEEP_CONST); // 10 ms
--time_left;
- // break if number of threads in waiting state equals to number of alive tids minus current one
+ // break if all managed alive threads are in waiting state
if (alive_threads_have_state(1)) {
// threads that were read some lines above are all sleeping here - BUT - could have
- // spawned new threads between reading list from /proc and checking status with count_alive_tids_with_state()
+ // spawned new threads between reading list from /proc and checking status with alive_threads_have_state()
// to make sure the loop can end, here we read /proc again
check_threads(own_tid);