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>
|
|
metze
|
|
metze
|
|
|
|
Signed-off-by: Bo Yang <boyang@samba.org>
|
|
|
|
I don't know if this is a problem in real life.
The code assumes there's only one tevent_context; all signals will notify
the first event context. That's counter-intuitive if you ever use more
than one, and there's nothing else in this code which prevents it AFAICT.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
This offers a generic way for callers to cancel an
async request.
metze
|
|
move publicly needed structures and functions in the public header.
Stop installing internal headers.
Update the signature and exports files with the new exposed
function.
|
|
This is not ideal, but at least it fixes the build of samba-gtk for now.
I've also added a warning about API guarantees at the top of the header.
|
|
This is very useful to find bugs.
You can use 'p *req' in gdb to show where
tevent_req_done(), tevent_req_error() or tevent_req_nomem()
was called.
metze
|
|
Now tevent_req_post() never fails
metze
|
|
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
|
|
This is an ugly hack to let the s4 server work arround
some bugs related to nested events and uid changing.
metze
|
|
Incompatible caller should use tevent_loop_allow_nesting()
function.
metze
|
|
metze
|
|
This function can be called as last action of a _recv()
function, it destroys the data attached to the tevent_req.
metze
|
|
Move struct tevent_req in tevent_internal, and ad getters and setters
for private data and the callback function.
This patch also renames 'private_state' into 'data'. What is held in this
pointer is in fact data and not a state like enum tevent_req_state.
Calling it 'state' is confusing.
The functions addedd are:
tevent_req_set_callback() - sets req->async.fn and req->async.private_data
tevent_req_set_print_fn() - sets req->private_print
tevent_req_callback_data() - gets req->async.private_data
tevent_req_data() - gets rea->data
This way it is much simpler to keep API/ABI compatibility in the future.
|
|
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
|
|
This is almost a copy of the async_req code,
which will be removed later.
metze
|
|
metze
|
|
It makes no sense to support aio events because,
the current implementation was based on IOCB_CMD_EPOLL_WAIT
which never made it into the main kernel tree.
The native linux aio can be used with select/epoll
using eventfd(), which means we can implement aio
with fd events and implement aio outside of tevent.
metze
|
|
metze
|
|
metze
|
|
metze
|
|
Let callers specify a close function
as an alternative to TEVENT_FD_AUTOCLOSE.
metze
|
|
metze
|
|
And related changes, but we keep compat macros
metze
|
|
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
|
|
|
|
This commit will not compile on its own.
metze
|