summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2013-04-15 01:50:44 -0700
committerJosh Blum2013-04-15 01:50:44 -0700
commit26a0d8931830d7723f568d1bf8876b0a205e234d (patch)
tree96c9dec7b0c586b06a3c07a751f8474ece9c481e
parent1afc6d4bf5601341f805a13df7ad9a4f99a7d98a (diff)
downloadsandhi-26a0d8931830d7723f568d1bf8876b0a205e234d.tar.gz
sandhi-26a0d8931830d7723f568d1bf8876b0a205e234d.tar.bz2
sandhi-26a0d8931830d7723f568d1bf8876b0a205e234d.zip
gras: assign a few more missing UNLIKELYs
m---------gnuradio0
-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
4 files changed, 4 insertions, 4 deletions
diff --git a/gnuradio b/gnuradio
-Subproject 563240c2b4efc26e6c4032b0d3d75fc5489b7f1
+Subproject ae55a6d41af61415a56f43b087ccba2f43409fa
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;