From 0cb4f2b1acb16c1ee1bd86a40116300ea2e2cdaa Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期二, 26 一月 2021 10:18:30 +0800
Subject: [PATCH] update

---
 src/queue/lock_free_queue.h |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/queue/lock_free_queue.h b/src/queue/lock_free_queue.h
index 70549d4..56eac66 100644
--- a/src/queue/lock_free_queue.h
+++ b/src/queue/lock_free_queue.h
@@ -211,10 +211,10 @@
       template<typename T, typename AT> class Q_TYPE>
 int LockFreeQueue<ELEM_T, Allocator, Q_TYPE>::push(const ELEM_T &a_data, const struct timespec *timeout, int flag) {
   // LoggerFactory::getLogger()->debug("==================LockFreeQueue push before\n");
-  sigset_t mask_all, pre;
-  sigfillset(&mask_all);
+  // sigset_t mask_all, pre;
+  // sigfillset(&mask_all);
 
-  sigprocmask(SIG_BLOCK, &mask_all, &pre);
+  // sigprocmask(SIG_BLOCK, &mask_all, &pre);
 
   if ((flag & BUS_NOWAIT_FLAG) == BUS_NOWAIT_FLAG) {
       if (psem_trywait(&slots) == -1) {
@@ -233,13 +233,13 @@
 
   if (m_qImpl.push(a_data)) {
     psem_post(&items);
-    sigprocmask(SIG_SETMASK, &pre, NULL);
+    // sigprocmask(SIG_SETMASK, &pre, NULL);
     LoggerFactory::getLogger()->debug("==================LockFreeQueue push after\n");
     return 0;
   }
   
 LABEL_FAILTURE:
-  sigprocmask(SIG_SETMASK, &pre, NULL);
+  // sigprocmask(SIG_SETMASK, &pre, NULL);
   return errno;
 }
 
@@ -249,10 +249,10 @@
 int LockFreeQueue<ELEM_T, Allocator, Q_TYPE>::pop(ELEM_T &a_data, const struct timespec *timeout, int flag) {
   // LoggerFactory::getLogger()->debug("==================LockFreeQueue pop before....");
 
-  sigset_t mask_all, pre;
-  sigfillset(&mask_all);
+  // sigset_t mask_all, pre;
+  // sigfillset(&mask_all);
 
-  sigprocmask(SIG_BLOCK, &mask_all, &pre);
+  // sigprocmask(SIG_BLOCK, &mask_all, &pre);
 
   if ((flag & BUS_NOWAIT_FLAG) == BUS_NOWAIT_FLAG) {
       if (psem_trywait(&items) == -1) {
@@ -272,13 +272,13 @@
 
   if (m_qImpl.pop(a_data)) {
       psem_post(&slots);
-      sigprocmask(SIG_SETMASK, &pre, NULL);
+      // sigprocmask(SIG_SETMASK, &pre, NULL);
       // LoggerFactory::getLogger()->debug("==================LockFreeQueue pop after\n");
       return 0;
   }
 
 LABEL_FAILTURE:
-  sigprocmask(SIG_SETMASK, &pre, NULL);
+  // sigprocmask(SIG_SETMASK, &pre, NULL);
   return errno;
 }
 

--
Gitblit v1.8.0