Age | Commit message (Collapse) | Author | Files | Lines |
|
This can be used to implement wrapper backends,
while passing a private pointer to the backens init function
via ev->additional_data.
metze
|
|
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Dec 9 16:47:23 CET 2011 on sn-devel-104
|
|
the tevent destructor is called in tevent_re_initialise(), to reset
the event context back to its original state for creating child
processes. We need the nesting flag to stay the same
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Aug 12 05:18:25 CEST 2011 on sn-devel-104
|
|
We may be forking from within a loop, so we need to clean-up to avoid
aborts when nesting is not allowed and we are in a new children.
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
|
|
|
There is no such flag.
|
|
This allows us to re-initialise a tevent context without destroying
the pointer. That means that if someone keeps a long term ptr to the
event context across a fork it will still work.
This also brings the memory handling in single and standard process
models much closer together, which means less bugs that we don't find
with make test.
|
|
Signed-off-by: Bo Yang <boyang@samba.org>
|
|
The "hack_fds" were never closed before; now they're inside event_context
they should be closed when that is destroyed.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
|
Only tevent_loop_once and tevent_loop_until() should care
about the nesting level.
This fixes the samba3 printing code where we use tevent_loop_wait()
and don't allow nested events.
We still call the nesting hook for all levels, we need to decide
if we really want this...
metze
|
|
The event nesting code never triggered as nesting.level was never
greater than 1. The main event loop needs to increase the nesting
level by 1.
I also added a paranoia check to the nesting setup call. The API as
currently written cannot support multiple nesting hooks, so we need to
abort if multiple hooks are tried.
|
|
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 only a hack for samba4 and should not be used
in new code.
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
|
|
metze
|
|
Not every tevent backend supports signal events.
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
|
|
|
|
the first one
Signed-off-by: Bo Yang <boyang@novell.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
doesn't exists anymore
metze
|
|
metze
|
|
tevent_fd_set_auto_close() is a simple wrapper
arround tevent_fd_set_close_fn() with a callback
that uses plain close(2).
metze
|
|
Let callers specify a close function
as an alternative to TEVENT_FD_AUTOCLOSE.
metze
|
|
metze
|
|
This passes some additional debug information into
the events system to make it easier to find bugs.
metze
|
|
metze
|
|
And fix the callers and there init functions.
metze
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
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
|