When we choose to insert a fd in either the global or the local fd update list,
and the thread_mask against all_threads_mask before checking if it's tid_bit,
that way, if we run with nbthreads==1, we will always use the local list,
which is cheaper than the global one.
*/
static inline void updt_fd_polling(const int fd)
{
- if (fdtab[fd].thread_mask == tid_bit) {
+ if ((fdtab[fd].thread_mask & all_threads_mask) == tid_bit) {
unsigned int oldupdt;
/* note: we don't have a test-and-set yet in hathreads */