summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/syncop.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-07-01 22:32:44 +0530
committerVijay Bellur <vbellur@redhat.com>2015-07-02 00:36:27 -0700
commite7f2547f89dbcd90cdb3714f63620a36bdc2ef3a (patch)
tree996981d5d784aeb05fa84fb34313973401599eb3 /libglusterfs/src/syncop.c
parentfb20db2078dd7fe1a202f8c0c6f8bd7ecc7ff875 (diff)
libglusterfs: Use GF_CALLOC/GF_FREE instead of CALLOC/FREE
- Also removed numbers for the types as the string form of type is printed in statedump now, so the numbers are not needed anymore. Change-Id: I6e8c15a1dc8cb6187842f96f1d46ec0f26a602b4 BUG: 1237381 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11495 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src/syncop.c')
-rw-r--r--libglusterfs/src/syncop.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index a7a31e492c5..695f04b2a31 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -389,7 +389,7 @@ synctask_destroy (struct synctask *task)
if (!task)
return;
- FREE (task->stack);
+ GF_FREE (task->stack);
if (task->opframe)
STACK_DESTROY (task->opframe->root);
@@ -399,7 +399,7 @@ synctask_destroy (struct synctask *task)
pthread_cond_destroy (&task->cond);
}
- FREE (task);
+ GF_FREE (task);
}
@@ -461,7 +461,7 @@ synctask_create (struct syncenv *env, synctask_fn_t fn, synctask_cbk_t cbk,
if (destroymode)
return NULL;
- newtask = CALLOC (1, sizeof (*newtask));
+ newtask = GF_CALLOC (1, sizeof (*newtask), gf_common_mt_synctask);
if (!newtask)
return NULL;
@@ -495,7 +495,7 @@ synctask_create (struct syncenv *env, synctask_fn_t fn, synctask_cbk_t cbk,
goto err;
}
- newtask->stack = CALLOC (1, env->stacksize);
+ newtask->stack = GF_CALLOC (1, env->stacksize, gf_common_mt_syncstack);
if (!newtask->stack) {
goto err;
}
@@ -525,10 +525,10 @@ synctask_create (struct syncenv *env, synctask_fn_t fn, synctask_cbk_t cbk,
return newtask;
err:
if (newtask) {
- FREE (newtask->stack);
+ GF_FREE (newtask->stack);
if (newtask->opframe)
STACK_DESTROY (newtask->opframe->root);
- FREE (newtask);
+ GF_FREE (newtask);
}
return NULL;
@@ -771,7 +771,7 @@ syncenv_destroy (struct syncenv *env)
pthread_mutex_destroy (&env->mutex);
pthread_cond_destroy (&env->cond);
- FREE (env);
+ GF_FREE (env);
return;
}
@@ -792,7 +792,7 @@ syncenv_new (size_t stacksize, int procmin, int procmax)
if (procmin > procmax)
return NULL;
- newenv = CALLOC (1, sizeof (*newenv));
+ newenv = GF_CALLOC (1, sizeof (*newenv), gf_common_mt_syncenv);
if (!newenv)
return NULL;