_tevent_req_nomem: bool (const void *, struct tevent_req *, const char *)
_tevent_req_notify_callback: void (struct tevent_req *, const char *)
_tevent_req_oom: void (struct tevent_req *, const char *)
+_tevent_req_set_callback: void (struct tevent_req *, tevent_req_fn, const char *, void *)
_tevent_schedule_immediate: void (struct tevent_immediate *, struct tevent_context *, tevent_immediate_handler_t, void *, const char *, const char *)
_tevent_threaded_schedule_immediate: void (struct tevent_threaded_context *, struct tevent_immediate *, tevent_immediate_handler_t, void *, const char *, const char *)
tevent_abort: void (struct tevent_context *, const char *)
* callback.
*/
void tevent_req_set_callback(struct tevent_req *req, tevent_req_fn fn, void *pvt);
+void _tevent_req_set_callback(struct tevent_req *req,
+ tevent_req_fn fn,
+ const char *fn_name,
+ void *pvt);
+
+#define tevent_req_set_callback(req, fn, pvt) \
+ _tevent_req_set_callback(req, fn, #fn, pvt)
#ifdef DOXYGEN
/**
* @brief Private data for the completion function
*/
void *private_data;
+ /**
+ * @brief The completion function name, for flow tracing.
+ */
+ const char *fn_name;
} async;
/**
#include "tevent_internal.h"
#include "tevent_util.h"
+#undef tevent_req_set_callback
+
char *tevent_req_default_print(struct tevent_req *req, TALLOC_CTX *mem_ctx)
{
return talloc_asprintf(mem_ctx,
}
void tevent_req_set_callback(struct tevent_req *req, tevent_req_fn fn, void *pvt)
+{
+ return _tevent_req_set_callback(req, fn, NULL, pvt);
+}
+
+void _tevent_req_set_callback(struct tevent_req *req,
+ tevent_req_fn fn,
+ const char *fn_name,
+ void *pvt)
{
req->async.fn = fn;
+ req->async.fn_name = fn_name;
req->async.private_data = pvt;
}