summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2009-05-22 02:10:21 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-05-22 00:58:42 -0700
commit207fb347ed24716ac4f443bab2d1daeb9ae5ccf4 (patch)
tree853fdf1d039c764bd9a2262fc7b5b152403cbf23 /glusterfsd/src
parentbd297be1d1fedc85d70b9b1f3e4d4aa7b9980c76 (diff)
globals: add globals.h/c THIS: macro to access thread specific current xlator CTX: macro to access glusterfs global context (glusterfs_ctx_t)
Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'glusterfsd/src')
-rw-r--r--glusterfsd/src/glusterfsd.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index 3a0c30f98c7..720d8a775ee 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -61,6 +61,7 @@
#include "revision.h"
#include "common-utils.h"
#include "event.h"
+#include "globals.h"
#include <fnmatch.h>
@@ -980,9 +981,12 @@ main (int argc, char *argv[])
int xl_count = 0;
uint8_t process_mode = 0;
+ ret = glusterfs_globals_init ();
+ if (ret)
+ return ret;
+
utime = time (NULL);
- ctx = CALLOC (1, sizeof (glusterfs_ctx_t));
- ERR_ABORT (ctx);
+ ctx = glusterfs_ctx_get ();
process_mode = gf_get_process_mode (argv[0]);
set_global_ctx_ptr (ctx);
ctx->process_uuid = zr_build_process_uuid ();