summaryrefslogtreecommitdiffstats
path: root/lib/tevent/tevent.h
Commit message (Collapse)AuthorAgeFilesLines
* tevent: add tevent_req_set_cleanup_fn()Stefan Metzmacher2014-01-171-0/+35
| | | | | | | | | | | | | | | | | | | | | | | Note that some callers used their own destructor for their tevent_req instance, they'll just overwrite this, which is not intended, but works without problems. The intended way is to specify a cleanup function and handle the TEVENT_REQ_RECEIVED state as destructor. Note that the TEVENT_REQ_RECEIVED cleanup event might be triggered by an explicit tevent_req_received() in the _recv() function. The TEVENT_REQ_RECEIVED event is only triggered once as tevent_req_received() will remove the destructor. So the difference compared to a custom destructor is that the struct tevent_req itself can continue to be there, while tevent_req_received() removed all internal state. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: add doxygen comments for tevent_num_signals() and ↵Stefan Metzmacher2014-01-171-0/+23
| | | | | | | tevent_sa_info_queue_count() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: Add prototypesVolker Lendecke2014-01-171-0/+4
| | | | | | | ... doxygen docs to be filled in :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* tevent: add tevent_queue_wait_send/recv()Gregor Beck2013-12-111-0/+33
| | | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: document tevent_req_create state zeroingDavid Disseldorp2013-07-081-3/+3
| | | | | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jul 8 20:43:49 CEST 2013 on sn-devel-104
* tevent: add trace points BEFORE_LOOP_ONCE and AFTER_LOOP_ONCEMichael Adam2013-03-011-0/+11
| | | | | | | | | | The define TEVENT_HAS_LOOP_ONCE_TRACE_POINTS can be used to detect the new feature, without writing configure tests. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* tevent: expose tevent_context_init_opsStefan Metzmacher2012-06-081-0/+14
| | | | | | | | This can be used to implement wrapper backends, while passing a private pointer to the backens init function via ev->additional_data. metze
* lib/tevent: Add trace point callbackMartin Schwenke2012-06-081-0/+43
| | | | | | | | | | | | 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>
* tevent: fix documentation for tevent_context_init_byname()Sumit Bose2011-08-111-2/+2
| | | | | | | 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
* tevent: fix some comments in tevent.hStefan Metzmacher2011-08-091-2/+2
| | | | metze
* tevent: add tevent_queue_add_entry() and tevent_queue_add_optimize_empty()Stefan Metzmacher2011-08-091-0/+76
| | | | | | | | | | | | 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
* tevent: allow tevent_queue_add() to take a NULL trigger functionStefan Metzmacher2011-08-091-1/+3
| | | | | | This way the caller can add a blocker to the queue. metze
* tevent: add tevent_queue_running() functionStefan Metzmacher2011-08-091-0/+11
| | | | metze
* tevent: add tevent_req_defer_callback()Stefan Metzmacher2011-07-091-0/+42
| | | | metze
* tevent: fix comments for tevent_req_post()Stefan Metzmacher2011-07-091-2/+2
| | | | metze
* tevent: Add tevent_req_oomVolker Lendecke2011-06-201-0/+14
| | | | This is a replacement for tevent_req_nomem(NULL, req)
* lib/tevent/tevent.h: minor documentation fix.Rusty Russell2011-06-011-3/+3
| | | | | | | | | | | 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
* tevent: Fix a typoVolker Lendecke2011-05-091-1/+1
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon May 9 08:17:08 CEST 2011 on sn-devel-104
* tevent: Fixed tevent_wakeup_send code example.Andreas Schneider2011-03-091-1/+1
|
* tevent: More documentation updatesVolker Lendecke2010-12-261-1/+72
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Dec 26 15:49:59 CET 2010 on sn-devel-104
* tevent: More doc fixesVolker Lendecke2010-12-261-13/+47
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Dec 26 10:20:51 CET 2010 on sn-devel-104
* tevent: Some documentation fixesVolker Lendecke2010-12-251-22/+45
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sat Dec 25 23:58:20 CET 2010 on sn-devel-104
* tevent: Fix docstring, tevent_req_is_in_progress does not destroy private dataKai Blin2010-11-171-2/+0
| | | | | Autobuild-User: Kai Blin <kai@samba.org> Autobuild-Date: Wed Nov 17 07:23:51 UTC 2010 on sn-devel-104
* tevent: Added a description for tevent queue.Andreas Schneider2010-05-101-0/+9
|
* tevent: Document the tevent_queue functions.Andreas Schneider2010-05-051-0/+68
|
* tevent: Document the tevent helper functions.Andreas Schneider2010-05-051-0/+67
|
* tevent: Document missing callback typedefs.Andreas Schneider2010-05-051-2/+36
|
* tevent: Document the missing tevent async request callback functions.Andreas Schneider2010-05-051-1/+144
|
* tevent: Create a typedef for the debug function callback.Andreas Schneider2010-05-051-6/+20
|
* tevent: Added more documentation.Stephen Gallagher2010-05-051-11/+247
|
* tevent: Remove erroneous comments about TEVENT_FD_AUTOCLOSEStephen Gallagher2010-05-051-3/+0
| | | | There is no such flag.
* tevent: Added basic doxygen documentation.Andreas Schneider2010-05-051-15/+375
|
* tevent: added tevent_re_initialise()Andrew Tridgell2010-03-261-0/+2
| | | | | | | | | | 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.
* Spelling fixes for tevent.Brad Hards2010-02-221-1/+1
| | | | Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
* tevent: add tevent_req_cancel() infrastructureStefan Metzmacher2009-08-171-0/+8
| | | | | | | This offers a generic way for callers to cancel an async request. metze
* Expose functions need by backend writersSimo Sorce2009-07-031-0/+64
| | | | | | | 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.
* Add tevent_req_notify_callbackVolker Lendecke2009-06-041-0/+4
| | | | | This is necessary for requests that have multiple results. Examples would be SMBEcho and ldap_search.
* tevent: store the location where a request was finishedStefan Metzmacher2009-03-171-7/+16
| | | | | | | | | 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
* tevent: use an immediate event as trigger for tevent_queueStefan Metzmacher2009-03-171-2/+1
| | | | metze
* tevent: add support for immediate eventsStefan Metzmacher2009-03-171-0/+19
| | | | | | | | They're like directly triggered timed events, but you can preallocated them and scheduling them will not fail. metze
* tevent: add tevent_loop_until()Stefan Metzmacher2009-03-121-0/+6
| | | | | | | This is only a hack for samba4 and should not be used in new code. metze
* tevent: add tevent_loop_set_nesting_hook()Stefan Metzmacher2009-03-121-0/+9
| | | | | | | This is an ugly hack to let the s4 server work arround some bugs related to nested events and uid changing. metze
* tevent: don't allow nested tevent_loop_once() anymoreStefan Metzmacher2009-03-121-0/+11
| | | | | | | Incompatible caller should use tevent_loop_allow_nesting() function. metze
* tevent: pass __location__ to tevent_loop_once/wait()Stefan Metzmacher2009-03-121-2/+7
| | | | metze
* tevent: add tevent_set_abort_fn()Stefan Metzmacher2009-03-121-0/+2
| | | | metze
* tevent: add tevent_signal_support()Stefan Metzmacher2009-03-121-0/+2
| | | | | | Not every tevent backend supports signal events. metze
* tevent: add tevent_req_callback_data_void() macroStefan Metzmacher2009-03-101-0/+2
| | | | | | | Callers can use it instead of tevent_req_callback_data() if they use a non talloc private pointer. metze
* tevent: add tevent_req_received() functionStefan Metzmacher2009-03-101-1/+7
| | | | | | | This function can be called as last action of a _recv() function, it destroys the data attached to the tevent_req. metze
* Make struct tevent_req opaqueSimo Sorce2009-03-021-89/+13
| | | | | | | | | | | | | | | | 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.
* tevent: add tevent_queue infrastructureStefan Metzmacher2009-02-261-0/+22
| | | | metze