tevent: store the location where a request was finished
[ira/wip.git] / lib / tevent / tevent.h
index 3930092ee5930605d3a5f9df103489c5eab83edb..6c5df6321a5be6d972bc7588ed33f639773401ef 100644 (file)
@@ -252,13 +252,22 @@ bool tevent_req_set_endtime(struct tevent_req *req,
                            struct tevent_context *ev,
                            struct timeval endtime);
 
-void tevent_req_done(struct tevent_req *req);
-
-bool tevent_req_error(struct tevent_req *req,
-                     uint64_t error);
-
-bool tevent_req_nomem(const void *p,
-                     struct tevent_req *req);
+void _tevent_req_done(struct tevent_req *req,
+                     const char *location);
+#define tevent_req_done(req) \
+       _tevent_req_done(req, __location__)
+
+bool _tevent_req_error(struct tevent_req *req,
+                      uint64_t error,
+                      const char *location);
+#define tevent_req_error(req, error) \
+       _tevent_req_error(req, error, __location__)
+
+bool _tevent_req_nomem(const void *p,
+                      struct tevent_req *req,
+                      const char *location);
+#define tevent_req_nomem(p, req) \
+       _tevent_req_nomem(p, req, __location__)
 
 struct tevent_req *tevent_req_post(struct tevent_req *req,
                                   struct tevent_context *ev);