tevent: optimize adding new zero timer events
authorStefan Metzmacher <metze@samba.org>
Fri, 22 Feb 2013 11:45:39 +0000 (12:45 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 1 Mar 2013 19:00:28 +0000 (20:00 +0100)
commit1ff186062de976472991d0eb254455c33cd2ce25
tree79cc502e6efe9bca3d84a8663d202fe80aa71e60
parentb6e2886168b4033474d3821947ac41c2d9e2d698
tevent: optimize adding new zero timer events

Such events were used before we had immediate events.
It's likely that there're a lot of this events
and we need to add new ones in fifo order.

The tricky part is that tevent_common_add_timer()
should not use the optimization as it's used
by broken Samba versions, which don't use
tevent_common_loop_timer_delay() in source3/lib/events.c.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
lib/tevent/tevent.c
lib/tevent/tevent_epoll.c
lib/tevent/tevent_internal.h
lib/tevent/tevent_poll.c
lib/tevent/tevent_select.c
lib/tevent/tevent_timed.c