| | |
| | | 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; |
| | |
| | | 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); |