]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: poll: move the conditions for waiting out of the poll functions
authorWilly Tarreau <w@1wt.eu>
Mon, 13 Apr 2015 18:44:19 +0000 (20:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 13 Apr 2015 18:47:51 +0000 (20:47 +0200)
commit10146c9c51e17272970b19434be2e0bca0c7cf8f
tree114bd0d56d9da33624f61fc8788f40d7418bea46
parent108b1dd69d4e26312af465237487bdb855b0de60
CLEANUP: poll: move the conditions for waiting out of the poll functions

The poll() functions have become a bit dirty because they now check the
size of the signal queue, the FD cache and the number of tasks. It's not
their job, this must be moved to the caller. In the end it simplifies the
code because the expiration date is now set to now_ms if we must not wait,
and this achieves in exactly the same result and is cleaner. The change
looks large due to the change of indent for blocks which were inside an
"if" block.
src/ev_epoll.c
src/ev_kqueue.c
src/ev_poll.c
src/ev_select.c
src/haproxy.c