summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/stack.h
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2012-10-16 14:21:17 -0400
committerAnand Avati <avati@redhat.com>2012-10-25 00:05:10 -0700
commitc7f7f134a7e2ee14d07d16d96c7849c6fd310693 (patch)
tree4c5122b77d668d2b53809a8a2dd4a3002ca2b7ac /libglusterfs/src/stack.h
parent6be9a19b940dd52cdc6e2df4b212e6221b2cfcb2 (diff)
core: add STACK_WIND_TAIL for more efficient default_xxx.
Change-Id: Ic38e2183d1320bb17c014aca33779471c8db5d5f BUG: 867132 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4092 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/stack.h')
-rw-r--r--libglusterfs/src/stack.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h
index 63307192ae5..b14b08dbb9a 100644
--- a/libglusterfs/src/stack.h
+++ b/libglusterfs/src/stack.h
@@ -254,6 +254,20 @@ STACK_RESET (call_stack_t *stack)
} while (0)
+/* make a call without switching frames */
+#define STACK_WIND_TAIL(frame, obj, fn, params ...) \
+ do { \
+ xlator_t *old_THIS = NULL; \
+ \
+ frame->this = obj; \
+ frame->wind_to = #fn; \
+ old_THIS = THIS; \
+ THIS = obj; \
+ fn (frame, obj, params); \
+ THIS = old_THIS; \
+ } while (0)
+
+
/* make a call with a cookie */
#define STACK_WIND_COOKIE(frame, rfn, cky, obj, fn, params ...) \
do { \