Age | Commit message (Collapse) | Author | Files | Lines |
|
Set/get a single callback function to be invoked at various trace
points. Define "before wait" and "after wait" trace points - more
trace points can be added later if required.
CTDB wants this to log long waits and events.
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Feb 28 21:10:08 CET 2011 on sn-devel-104
|
|
When doing
fd1 = tevent_add_fd(ev, ev, 2, 0, NULL, NULL);
fd2 = tevent_add_fd(ev, ev, 3, 0, NULL, NULL);
TALLOC_FREE(fd2);
fd2 = tevent_add_fd(ev, ev, 1, 0, NULL, NULL);
we end up with select_ev->maxfd==1. This is wrong.
An alternative fix might be to make select_ev->maxfd an unsigned int and make
EVENT_INVALID_MAXFD==UINT_MAX. But in theory we might end up with an fd of
UINT_MAX.
std_event_add_fd() contains exactly the same piece of code, so I'm directly
pushing it.
Volker
|
|
these are not supposed to be exposed in the library
|
|
They're like directly triggered timed events,
but you can preallocated them and scheduling them
will not fail.
metze
|
|
tevent_loop_wait should do the same for all backends.
It should loop as long as we have pending events.
metze
|
|
We also check for signal events directly before and after
the select/epoll calls.
metze
|
|
This makes the logic much simpler for the callers,
and matches the samba3 behavior.
If needed we can add performance tunning for tevent_loop_wait()
later.
metze
|
|
metze
|
|
Also add tevent_timeval_add() and tevent_timeval_current_ofs()
to help not depending on lub/util/time.c for things that just need tevent
|
|
metze
|
|
metze
|
|
metze
|
|
This fixes crash bugs... I forgot to commit and squash
this to commit e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd
metze
|
|
TEVENT_FD_AUTOCLOSE adds a dependency to SOCKET_WRAPPER,
which is bad. Callers should use tevent_fd_set_close_fn() now.
metze
|
|
Let callers specify a close function
as an alternative to TEVENT_FD_AUTOCLOSE.
metze
|
|
metze
|
|
metze
|
|
And related changes, but we keep compat macros
metze
|
|
metze
|
|
And fix the callers and there init functions.
metze
|
|
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"
for s in $list; do
o=`echo $s | cut -d ':' -f1`
n=`echo $s | cut -d ':' -f2`
r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
for f in $files; do
cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
mv $f.tmp $f
done
done
metze
|
|
We have compat macros to keep the callers happy.
metze
|
|
metze
|
|
This commit will not compile on its own.
metze
|