From 0dbd3968626445b4dcb00307e45206b37dd0e8ad Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 18 Jan 2009 16:38:30 +0100 Subject: Add a macro async_req_setup() This streamlines setting up a multi-step async request a bit --- source3/include/async_req.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/include') diff --git a/source3/include/async_req.h b/source3/include/async_req.h index 1b8dbf3346..3907a08f67 100644 --- a/source3/include/async_req.h +++ b/source3/include/async_req.h @@ -150,4 +150,11 @@ bool async_req_enqueue(struct async_req_queue *queue, struct async_req *req, void (*trigger)(struct async_req *req)); +bool _async_req_setup(TALLOC_CTX *mem_ctx, struct async_req **preq, + void *pstate, size_t state_size, const char *typename); + +#define async_req_setup(_mem_ctx, _preq, _pstate, type) \ + _async_req_setup((_mem_ctx), (_preq), (_pstate), sizeof(type), #type) + + #endif -- cgit