Stefan Metzmacher
cb388882cf
tevent: add tevent_loop_until()
...
This is only a hack for samba4 and should not be used
in new code.
metze
2009-03-12 14:21:26 +01:00
Stefan Metzmacher
7142ef49bd
tevent: add tevent_loop_set_nesting_hook()
...
This is an ugly hack to let the s4 server work arround
some bugs related to nested events and uid changing.
metze
2009-03-12 14:21:26 +01:00
Stefan Metzmacher
06f88fe7a2
tevent: don't allow nested tevent_loop_once() anymore
...
Incompatible caller should use tevent_loop_allow_nesting()
function.
metze
2009-03-12 12:14:18 +01:00
Stefan Metzmacher
9932fd2d9a
tevent: pass __location__ to tevent_loop_once/wait()
...
metze
2009-03-12 12:12:34 +01:00
Stefan Metzmacher
880d9d6d8c
tevent: add tevent_set_abort_fn()
...
metze
2009-03-12 12:04:33 +01:00
Stefan Metzmacher
43a7d48d24
tevent: add tevent_signal_support()
...
Not every tevent backend supports signal events.
metze
2009-03-12 12:04:31 +01:00
Stefan Metzmacher
825949b810
tevent: add tevent_req_callback_data_void() macro
...
Callers can use it instead of tevent_req_callback_data()
if they use a non talloc private pointer.
metze
2009-03-10 16:44:44 +01:00
Stefan Metzmacher
09d1b2324c
tevent: add tevent_req_received() function
...
This function can be called as last action of a _recv()
function, it destroys the data attached to the tevent_req.
metze
2009-03-10 16:44:44 +01:00
Simo Sorce
67d41d0fc7
Make struct tevent_req opaque
...
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.
2009-03-02 11:02:09 -05:00
Stefan Metzmacher
3a1f24f286
tevent: add tevent_queue infrastructure
...
metze
2009-02-26 14:22:12 +01:00
Stefan Metzmacher
e2f37ec106
tevent: add private_print function feature to tevent_req
...
metze
2009-02-25 14:30:55 +01:00
Stefan Metzmacher
13ac0dc456
tevent: add tevent_req_poll() function
...
metze
2009-02-25 14:08:36 +01:00
Volker Lendecke
9e3178e838
Attempt to fix the OpenChange build -- sorry for the break
2009-02-25 11:02:48 +01:00
Volker Lendecke
70814474f5
tevent.h requires bool and uint[16|32|64]_t
2009-02-24 20:40:46 +01:00
Stefan Metzmacher
975a881d54
tevent: add tevent_wakeup_send/recv()
...
This can be used as tevent_req based timer event.
metze
2009-02-18 10:31:36 +01:00
Stefan Metzmacher
7f6618a3de
tevent: rename tevent_req_set_timeout() => tevent_req_set_endtime()
...
This makes more clear what the function does.
metze
2009-02-18 10:31:35 +01:00
Kai Blin
48b874e376
tevent: Rename ev_timeval* functions to tevent_timeval, export them.
...
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
2009-02-17 09:19:31 +01:00
Stefan Metzmacher
6211162d3e
lib/tevent: change to LGPLv3+
...
metze
2009-02-16 08:53:25 +01:00
Volker Lendecke
f0440d0d56
Add missing prototype for "tevent_req_print"
2009-02-14 22:00:44 +01:00
Stefan Metzmacher
113651c517
lib/tevent: add tevent_req infrastructure
...
This is almost a copy of the async_req code,
which will be removed later.
metze
2009-02-13 18:37:01 +01:00
Stefan Metzmacher
1d949fe742
lib/tevent: remove broken tevent_aio support
...
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
2009-02-13 16:02:13 +01:00
Volker Lendecke
6572eff183
Attempt to fix the build on netbsd5
2009-01-05 22:10:25 +01:00
Stefan Metzmacher
beb8b8fc2d
tevent: fix tevent_add_timer() and tevent_add_aio() macros
...
metze
2009-01-05 10:53:39 +01:00
Stefan Metzmacher
67810019a0
tevent: remove TEVENT_FD_AUTOCLOSE feature
...
TEVENT_FD_AUTOCLOSE adds a dependency to SOCKET_WRAPPER,
which is bad. Callers should use tevent_fd_set_close_fn() now.
metze
2009-01-03 19:58:54 +01:00
Stefan Metzmacher
193eba85a9
tevent: add tevent_fd_set_auto_close()
...
tevent_fd_set_auto_close() is a simple wrapper
arround tevent_fd_set_close_fn() with a callback
that uses plain close(2).
metze
2009-01-03 19:58:51 +01:00
Stefan Metzmacher
e45ed828d0
tevent: add tevent_fd_set_close_fn()
...
Let callers specify a close function
as an alternative to TEVENT_FD_AUTOCLOSE.
metze
2009-01-03 19:58:51 +01:00
Stefan Metzmacher
1a26b67ee3
tevent: specify argument names for the event handlers
...
metze
2009-01-03 19:58:49 +01:00
Stefan Metzmacher
73ef1773be
tevent: only provide compat macros if the caller wants them
...
metze
2009-01-02 18:16:54 +01:00
Stefan Metzmacher
4f04b06ac2
tevent: rename ev_debug_ops => tevent_debug_ops
...
And related changes, but we keep compat macros
metze
2009-01-02 18:16:53 +01:00
Stefan Metzmacher
49acf9799a
tevent: make tevent_add_*() macros arround _tevent_add_*()
...
This passes some additional debug information into
the events system to make it easier to find bugs.
metze
2009-01-02 18:16:52 +01:00
Stefan Metzmacher
183c379fe5
s4:lib/tevent: rename structs
...
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
2008-12-29 20:46:40 +01:00
Stefan Metzmacher
7bf5768a52
lib/tevent: rename event_* => tevent_* in the header file
...
We have compat macros to keep the callers happy.
metze
2008-12-29 08:42:00 +01:00
Stefan Metzmacher
46eda79090
s4:lib/tevent: add lib/events/ compat and let things compile
...
metze
2008-12-17 13:31:29 +01:00
Stefan Metzmacher
504f8816e3
s4:lib/events: move to toplevel directory as lib/tevent/
...
This commit will not compile on its own.
metze
2008-12-17 13:31:28 +01:00