summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/syncop.c
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-09-24 09:45:08 -0700
committerVijay Bellur <vbellur@redhat.com>2013-09-25 01:33:16 -0700
commit84fa8af38d2eab0f72349abb8136811bd3e96570 (patch)
treeb8f21737a9c9dc083531d26762053a9edf1153fd /libglusterfs/src/syncop.c
parent8737b4697ad555a1e49ef87b5d439bfb74d8b5b5 (diff)
core: block unused signals in created threads
Block all signal except those which are set for explicit handling in glusterfs_signals_setup(). Since thread spawning code in libglusterfs and xlators can get called from application threads when used through libgfapi, it is necessary to do this blocking. Change-Id: Ia320f80521a83d2edcda50b9ad414583a0175281 BUG: 1011662 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5995 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src/syncop.c')
-rw-r--r--libglusterfs/src/syncop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index d2c8381a3d3..cd267cacc57 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -453,8 +453,8 @@ syncenv_scale (struct syncenv *env)
}
env->proc[i].env = env;
- ret = pthread_create (&env->proc[i].processor, NULL,
- syncenv_processor, &env->proc[i]);
+ ret = gf_thread_create (&env->proc[i].processor, NULL,
+ syncenv_processor, &env->proc[i]);
if (ret)
break;
env->procs++;
@@ -507,8 +507,8 @@ syncenv_new (size_t stacksize, int procmin, int procmax)
for (i = 0; i < newenv->procmin; i++) {
newenv->proc[i].env = newenv;
- ret = pthread_create (&newenv->proc[i].processor, NULL,
- syncenv_processor, &newenv->proc[i]);
+ ret = gf_thread_create (&newenv->proc[i].processor, NULL,
+ syncenv_processor, &newenv->proc[i]);
if (ret)
break;
newenv->procs++;