diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2014-09-24 19:00:09 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2014-09-24 19:00:09 +0200 |
commit | 89edba14f0dfb74f0694a20724405743ece00017 (patch) | |
tree | 70f29a39686145fddbe6336d7db5bf4c9e95331d | |
parent | 50e27cf3d83a17efe7d6ee7515d00716593a2a51 (diff) | |
download | ponymap-89edba14f0dfb74f0694a20724405743ece00017.tar.gz ponymap-89edba14f0dfb74f0694a20724405743ece00017.tar.xz ponymap-89edba14f0dfb74f0694a20724405743ece00017.zip |
Sort epoll_wait() output earlier
-rw-r--r-- | utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |