summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/common-utils.c')
-rw-r--r--libglusterfs/src/common-utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 851edad6667..284c444ccfd 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -4019,3 +4019,14 @@ out:
return ret;
}
+void
+_mask_cancellation (void)
+{
+ (void) pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL);
+}
+
+void
+_unmask_cancellation (void)
+{
+ (void) pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL);
+}