From 653f2ac59c0c25463e531a128563c295843bc4c1 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期三, 27 一月 2021 13:56:24 +0800
Subject: [PATCH] update
---
src/queue/lock_free_queue.h | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/queue/lock_free_queue.h b/src/queue/lock_free_queue.h
index 9f03437..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,15 +233,14 @@
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;
-
}
template<typename ELEM_T,
@@ -250,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) {
@@ -273,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