From 21f03d8d05e5c04953e31d7e4360346031603511 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期四, 04 二月 2021 11:47:50 +0800
Subject: [PATCH] 修改注解
---
src/queue/array_lock_free_sem_queue.h | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/queue/array_lock_free_sem_queue.h b/src/queue/array_lock_free_sem_queue.h
index 5f56dda..28f4d81 100644
--- a/src/queue/array_lock_free_sem_queue.h
+++ b/src/queue/array_lock_free_sem_queue.h
@@ -241,8 +241,8 @@
if( (flag & BUS_NOWAIT_FLAG) == BUS_NOWAIT_FLAG)
return errno;
else if( (flag & BUS_TIMEOUT_FLAG) == BUS_TIMEOUT_FLAG && timeout != NULL) {
- const struct timespec ts = TimeUtil::trim_time(timeout);
- s = futex((int *)&m_readIndex, FUTEX_WAIT, tmpIndex, &ts, NULL, 0);
+
+ s = futex((int *)&m_readIndex, FUTEX_WAIT, tmpIndex, timeout, NULL, 0);
if (s == -1 && errno != EAGAIN && errno != EINTR) {
// err_exit("ArrayLockFreeSemQueue<ELEM_T, Allocator>::push futex-FUTEX_WAIT");
return errno;
@@ -320,8 +320,7 @@
return errno;
}
else if( (flag & BUS_TIMEOUT_FLAG) == BUS_TIMEOUT_FLAG && timeout != NULL) {
- const struct timespec ts = TimeUtil::trim_time(timeout);
- s = futex((int *)&m_count, FUTEX_WAIT, 0, &ts, NULL, 0);
+ s = futex((int *)&m_count, FUTEX_WAIT, 0, timeout, NULL, 0);
if (s == -1 && errno != EAGAIN && errno != EINTR) {
// err_exit("ArrayLockFreeSemQueue<ELEM_T, Allocator>::push futex-FUTEX_WAIT");
// sigprocmask(SIG_SETMASK, &pre, NULL);
--
Gitblit v1.8.0