1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

68 Commits

Author SHA1 Message Date
Stefan Metzmacher
ba65400c6e tevent: expose tevent_context_init_ops
This can be used to implement wrapper backends,
while passing a private pointer to the backens init function
via ev->additional_data.

metze
2012-06-08 19:00:05 +02:00
Martin Schwenke
796acbd9ff lib/tevent: Add trace point callback
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>
2012-06-08 19:00:05 +02:00
Sumit Bose
ce93b4f464 tevent: fix documentation for tevent_context_init_byname()
Signed-off-by: Simo Sorce <idra@samba.org>

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Thu Aug 11 21:56:37 CEST 2011 on sn-devel-104
2011-08-11 21:56:37 +02:00
Stefan Metzmacher
c6363bb352 tevent: fix some comments in tevent.h
metze
2011-08-09 21:37:42 +02:00
Stefan Metzmacher
1533f1722d tevent: add tevent_queue_add_entry() and tevent_queue_add_optimize_empty()
This adds more flexible handling for the add operation:

- It allows the caller to remove a tevent_req from the queue
  by calling talloc_free() on the returned tevent_queue_entry.
- It allows the caller to optimize for the empty queue case,
  where it the caller wants to avoid the delay caused by
  the immediate event.

metze
2011-08-09 21:37:41 +02:00
Stefan Metzmacher
aba9d48f55 tevent: allow tevent_queue_add() to take a NULL trigger function
This way the caller can add a blocker to the queue.

metze
2011-08-09 21:37:41 +02:00
Stefan Metzmacher
3c38ec72e7 tevent: add tevent_queue_running() function
metze
2011-08-09 21:37:40 +02:00
Stefan Metzmacher
e5827a4007 tevent: add tevent_req_defer_callback()
metze
2011-07-09 11:02:42 +02:00
Stefan Metzmacher
2a1ebeae19 tevent: fix comments for tevent_req_post()
metze
2011-07-09 11:02:41 +02:00
Volker Lendecke
c2a826b10c tevent: Add tevent_req_oom
This is a replacement for tevent_req_nomem(NULL, req)
2011-06-20 12:33:24 +02:00
Rusty Russell
e340cd83f8 lib/tevent/tevent.h: minor documentation fix.
The usecs arguments are (of course) microseconds, not milliseconds.
This was added by Andreas Schneider in 6c1bcdc2 (tevent: Document the
tevent helper functions.).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Wed Jun  1 11:47:38 CEST 2011 on sn-devel-104
2011-06-01 11:47:38 +02:00
Volker Lendecke
8aab926c28 tevent: Fix a typo
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon May  9 08:17:08 CEST 2011 on sn-devel-104
2011-05-09 08:17:08 +02:00
Andreas Schneider
d4867ef838 tevent: Fixed tevent_wakeup_send code example. 2011-03-09 09:28:27 +01:00
Volker Lendecke
b2c983149c tevent: More documentation updates
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Dec 26 15:49:59 CET 2010 on sn-devel-104
2010-12-26 15:49:59 +01:00
Volker Lendecke
d2de01f95b tevent: More doc fixes
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Dec 26 10:20:51 CET 2010 on sn-devel-104
2010-12-26 10:20:51 +01:00
Volker Lendecke
f16740a408 tevent: Some documentation fixes
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Dec 25 23:58:20 CET 2010 on sn-devel-104
2010-12-25 23:58:20 +01:00
Kai Blin
3f43b7e542 tevent: Fix docstring, tevent_req_is_in_progress does not destroy private data
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Wed Nov 17 07:23:51 UTC 2010 on sn-devel-104
2010-11-17 07:23:51 +00:00
Andreas Schneider
3addebee34 tevent: Added a description for tevent queue. 2010-05-10 10:28:37 +02:00
Andreas Schneider
239d59feab tevent: Document the tevent_queue functions. 2010-05-05 09:28:04 +02:00
Andreas Schneider
6c1bcdc2e2 tevent: Document the tevent helper functions. 2010-05-05 09:28:04 +02:00
Andreas Schneider
78fbedf369 tevent: Document missing callback typedefs. 2010-05-05 09:28:04 +02:00
Andreas Schneider
a8e575ac22 tevent: Document the missing tevent async request callback functions. 2010-05-05 09:28:04 +02:00
Andreas Schneider
d8a6b23b07 tevent: Create a typedef for the debug function callback. 2010-05-05 09:28:04 +02:00
Stephen Gallagher
e286966bba tevent: Added more documentation. 2010-05-05 09:28:04 +02:00
Stephen Gallagher
098221e886 tevent: Remove erroneous comments about TEVENT_FD_AUTOCLOSE
There is no such flag.
2010-05-05 09:28:04 +02:00
Andreas Schneider
4263983cad tevent: Added basic doxygen documentation. 2010-05-05 09:28:04 +02:00
Andrew Tridgell
5609c50433 tevent: added tevent_re_initialise()
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.
2010-03-26 21:13:27 +11:00
Brad Hards
119a8230eb Spelling fixes for tevent.
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:32 +01:00
Stefan Metzmacher
45e4be0d96 tevent: add tevent_req_cancel() infrastructure
This offers a generic way for callers to cancel an
async request.

metze
2009-08-17 09:25:44 +02:00
Simo Sorce
30b2014a01 Expose functions need by backend writers
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.
2009-07-03 08:45:30 -04:00
Volker Lendecke
c6f39b46a7 Add tevent_req_notify_callback
This is necessary for requests that have multiple results. Examples would be
SMBEcho and ldap_search.
2009-06-04 17:29:48 +02:00
Stefan Metzmacher
9eaf53d98e tevent: store the location where a request was finished
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
2009-03-17 20:17:01 +01:00
Stefan Metzmacher
3a831e4620 tevent: use an immediate event as trigger for tevent_queue
metze
2009-03-17 19:59:09 +01:00
Stefan Metzmacher
66886f8966 tevent: add support for immediate events
They're like directly triggered timed events,
but you can preallocated them and scheduling them
will not fail.

metze
2009-03-17 19:59:00 +01:00
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