tevent: optimize adding new zero timer events
commite92acf072edd8b9763f1681942a6d48c24f5ca6d
authorStefan Metzmacher <metze@samba.org>
Fri, 22 Feb 2013 11:45:39 +0000 (22 12:45 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 6 Mar 2013 09:12:02 +0000 (6 10:12 +0100)
tree26683d0f776b815bf92427abbe36c3b51f8e66b5
parent877545860cc97ba3cce9a9d59a15a1dba24aecac
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>
Reviewed-by: Jeremy Allison <jra@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