summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient-internals.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-16 23:52:43 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-17 13:42:35 +0530
commit79215d4f2487e6db87e5fd637f0262037c1d230b (patch)
treea6eef7e320316800070b56728bd8707287278450 /libglusterfsclient/src/libglusterfsclient-internals.h
parentba4833355a1ee77f828b538a357e07c46f36b037 (diff)
libglusterfsclient: Create and use LIBGF_REPLY_NOTIFY macro
All reply notifications can now be abstracted away through this macro and all cbk functions should now call this. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient-internals.h')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient-internals.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient-internals.h b/libglusterfsclient/src/libglusterfsclient-internals.h
index b12c08efa..24364b079 100755
--- a/libglusterfsclient/src/libglusterfsclient-internals.h
+++ b/libglusterfsclient/src/libglusterfsclient-internals.h
@@ -186,6 +186,17 @@ typedef struct libglusterfs_client_async_local {
STACK_DESTROY (frame->root); \
} while (0)
+#define LIBGF_REPLY_NOTIFY(local) \
+ do { \
+ pthread_mutex_lock (&local->lock); \
+ { \
+ local->complete = 1; \
+ pthread_cond_broadcast (&local->reply_cond); \
+ } \
+ pthread_mutex_unlock (&local->lock); \
+ } while (0)
+
+
void
libgf_client_loc_wipe (loc_t *loc);