summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-09-24 19:00:09 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-09-24 19:00:09 +0200
commit89edba14f0dfb74f0694a20724405743ece00017 (patch)
tree70f29a39686145fddbe6336d7db5bf4c9e95331d /utils.c
parent50e27cf3d83a17efe7d6ee7515d00716593a2a51 (diff)
downloadponymap-89edba14f0dfb74f0694a20724405743ece00017.tar.gz
ponymap-89edba14f0dfb74f0694a20724405743ece00017.tar.xz
ponymap-89edba14f0dfb74f0694a20724405743ece00017.zip
Sort epoll_wait() output earlier
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils.c b/utils.c
index d5df179..8be61d6 100644
--- a/utils.c
+++ b/utils.c
@@ -1223,12 +1223,12 @@ poller_run (struct poller *self)
self->dispatch_next = 0;
self->dispatch_total = n_fds;
- poller_timers_dispatch (&self->timers);
- poller_idle_dispatch (self->idle);
-
// Sort them by file descriptor number for binary search
qsort (self->revents, n_fds, sizeof *self->revents, poller_compare_fds);
+ poller_timers_dispatch (&self->timers);
+ poller_idle_dispatch (self->idle);
+
while (self->dispatch_next < self->dispatch_total)
{
struct epoll_event *revents = self->revents + self->dispatch_next;