summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/buffer_queue_circ.cpp2
-rw-r--r--lib/buffer_queue_pool.cpp2
-rw-r--r--lib/gras_impl/output_buffer_queues.hpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/buffer_queue_circ.cpp b/lib/buffer_queue_circ.cpp
index 77dcd60..f152454 100644
--- a/lib/buffer_queue_circ.cpp
+++ b/lib/buffer_queue_circ.cpp
@@ -121,7 +121,7 @@ void BufferQueueCirc::pop(void)
void BufferQueueCirc::push(const SBuffer &buff)
{
//is it my buffer? otherwise dont keep it
- if (buff->config.token.lock() != _token) return;
+ if GRAS_UNLIKELY(buff->config.token.lock() != _token) return;
ASSERT(buff.get_user_index() < _returned_buffers.size());
_returned_buffers[buff.get_user_index()] = buff;
diff --git a/lib/buffer_queue_pool.cpp b/lib/buffer_queue_pool.cpp
index 003dec3..0b2d343 100644
--- a/lib/buffer_queue_pool.cpp
+++ b/lib/buffer_queue_pool.cpp
@@ -38,7 +38,7 @@ struct BufferQueuePool : BufferQueue
void push(const SBuffer &buff)
{
//is it my buffer? otherwise dont keep it
- if (buff->config.token.lock() != _token) return;
+ if GRAS_UNLIKELY(buff->config.token.lock() != _token) return;
//should never get a buffer from a circ queue
ASSERT(buff.get_user_index() == size_t(~0));
diff --git a/lib/gras_impl/output_buffer_queues.hpp b/lib/gras_impl/output_buffer_queues.hpp
index deea0e1..08869fd 100644
--- a/lib/gras_impl/output_buffer_queues.hpp
+++ b/lib/gras_impl/output_buffer_queues.hpp
@@ -35,7 +35,7 @@ struct OutputBufferQueues
GRAS_FORCE_INLINE void push(const size_t i, const SBuffer &buff)
{
- if (not _queues[i]) return; //block is likely done, throw out buffer
+ if GRAS_UNLIKELY(not _queues[i]) return; //block is likely done, throw out buffer
_queues[i]->push(buff);
_update(i);
}
@@ -88,7 +88,7 @@ struct OutputBufferQueues
GRAS_FORCE_INLINE void _update(const size_t i)
{
- if (not _queues[i] or _queues[i]->empty())
+ if GRAS_UNLIKELY(not _queues[i] or _queues[i]->empty())
{
_bitset.reset(i);
return;