From 207fb347ed24716ac4f443bab2d1daeb9ae5ccf4 Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Fri, 22 May 2009 02:10:21 +0000 Subject: 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 Signed-off-by: Anand V. Avati --- glusterfsd/src/glusterfsd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'glusterfsd') 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 @@ -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 (); -- cgit