From: Stefan Metzmacher Date: Fri, 28 Oct 2022 12:10:15 +0000 (+0200) Subject: tevent: expose tevent_find_ops_byname() to callers X-Git-Tag: tevent-0.14.0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07251f562c6cd777394b3ffa29525a69f5ceffc4;p=thirdparty%2Fsamba.git tevent: expose tevent_find_ops_byname() to callers This makes it more flexible and allow a caller to overload a tevent backend. Which will be used by Samba in order to glue in io_uring support. Signed-off-by: Stefan Metzmacher Reviewed-by: Pavel Filipenský Reviewed-by: Volker Lendecke --- diff --git a/lib/tevent/ABI/tevent-0.13.0.sigs b/lib/tevent/ABI/tevent-0.13.0.sigs index 68722a0e62f..76c84af812c 100644 --- a/lib/tevent/ABI/tevent-0.13.0.sigs +++ b/lib/tevent/ABI/tevent-0.13.0.sigs @@ -60,6 +60,7 @@ tevent_fd_set_auto_close: void (struct tevent_fd *) tevent_fd_set_close_fn: void (struct tevent_fd *, tevent_fd_close_fn_t) tevent_fd_set_flags: void (struct tevent_fd *, uint16_t) tevent_fd_set_tag: void (struct tevent_fd *, uint64_t) +tevent_find_ops_byname: const struct tevent_ops *(const char *) tevent_get_trace_callback: void (struct tevent_context *, tevent_trace_callback_t *, void *) tevent_get_trace_fd_callback: void (struct tevent_context *, tevent_trace_fd_callback_t *, void *) tevent_get_trace_immediate_callback: void (struct tevent_context *, tevent_trace_immediate_callback_t *, void *) diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c index e0151f9eb92..19f30ff7722 100644 --- a/lib/tevent/tevent.c +++ b/lib/tevent/tevent.c @@ -135,7 +135,7 @@ static void tevent_backend_init(void) tevent_standard_init(); } -_PRIVATE_ const struct tevent_ops *tevent_find_ops_byname(const char *name) +const struct tevent_ops *tevent_find_ops_byname(const char *name) { struct tevent_ops_list *e; diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h index 656df254be0..350270d8e40 100644 --- a/lib/tevent/tevent.h +++ b/lib/tevent/tevent.h @@ -2442,6 +2442,7 @@ struct tevent_ops { }; bool tevent_register_backend(const char *name, const struct tevent_ops *ops); +const struct tevent_ops *tevent_find_ops_byname(const char *name); /* @} */ diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h index 74a5d3d000d..a5df1b14b26 100644 --- a/lib/tevent/tevent_internal.h +++ b/lib/tevent/tevent_internal.h @@ -397,8 +397,6 @@ struct tevent_context { #endif }; -const struct tevent_ops *tevent_find_ops_byname(const char *name); - int tevent_common_context_destructor(struct tevent_context *ev); int tevent_common_loop_wait(struct tevent_context *ev, const char *location);