tevent: optimize adding new zero timer events
commit35385a3e28850d0915e8cf2883871ae2101526f1
authorStefan Metzmacher <metze@samba.org>
Fri, 22 Feb 2013 11:45:39 +0000 (22 12:45 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 1 Mar 2013 20:01:54 +0000 (1 12:01 -0800)
tree79cc502e6efe9bca3d84a8663d202fe80aa71e60
parentafd4198bf1ee5877a660d42e615e06d895690161
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