MINOR: poller: centralize poll return handling
When returning from the polling syscall, all pollers have a certain
dance to follow, made of wall clock updates, thread harmless updates,
idle time management and sleeping mask updates. Let's have a centralized
function to deal with all of this boring stuff: fd_leaving_poll(), and
make all the pollers use it.
diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c
index 3bc7121..43643fb 100644
--- a/src/ev_kqueue.c
+++ b/src/ev_kqueue.c
@@ -174,13 +174,7 @@
break;
} while (1);
- clock_leaving_poll(wait_time, status);
-
- thread_harmless_end();
- thread_idle_end();
-
- if (sleeping_thread_mask & tid_bit)
- _HA_ATOMIC_AND(&sleeping_thread_mask, ~tid_bit);
+ fd_leaving_poll(wait_time, status);
for (count = 0; count < status; count++) {
unsigned int n = 0;