diff options
author | Volker Lendecke <vl@samba.org> | 2009-01-18 16:38:30 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-01-18 16:45:07 +0100 |
commit | 0dbd3968626445b4dcb00307e45206b37dd0e8ad (patch) | |
tree | 79ffe7396e8af5c52593509df3877c545970d2b3 /source3/include | |
parent | c45b6ec29a5b3a39b83209e970b645e5ed0a411c (diff) | |
download | samba-0dbd3968626445b4dcb00307e45206b37dd0e8ad.tar.gz samba-0dbd3968626445b4dcb00307e45206b37dd0e8ad.tar.bz2 samba-0dbd3968626445b4dcb00307e45206b37dd0e8ad.zip |
Add a macro async_req_setup()
This streamlines setting up a multi-step async request a bit
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/async_req.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 |