diff options
| author | Anand V. Avati <avati@amp.gluster.com> | 2009-05-22 02:10:31 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2009-05-22 01:23:48 -0700 | 
| commit | 6d5aff7bfd2403aa132d41c659c76abaf58f0503 (patch) | |
| tree | 8ce3372e288ef34c4e31f347064e3222f2c6b032 /libglusterfs/src/xlator.c | |
| parent | bbce052d47e5f17a476379f5de6925ae795465bb (diff) | |
THIS: add xlator_init() API to set @THIS
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfs/src/xlator.c')
| -rw-r--r-- | libglusterfs/src/xlator.c | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 61f8f6f4e..0f76d9c7f 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -824,6 +824,23 @@ xlator_notify (xlator_t *xl, int event, void *data, ...)  } +int +xlator_init (xlator_t *xl) +{ +        xlator_t *old_THIS = NULL; +        int       ret = 0; + +        old_THIS = THIS; +        THIS = xl; + +        ret = xl->init (xl); + +        THIS = old_THIS; + +        return ret; +} + +  void  xlator_tree_fini (xlator_t *xl)  {  | 
