summaryrefslogtreecommitdiff
path: root/lib/input_handlers.cpp
diff options
context:
space:
mode:
authorJosh Blum2013-04-14 01:07:27 -0700
committerJosh Blum2013-04-14 01:07:27 -0700
commitecbd0c699884e8da150cfdcab836b1ffd5487f67 (patch)
treeeb07803391849ef872ea8c77111b129f3379d826 /lib/input_handlers.cpp
parent21026256a3f9cbfd5c35a1a60984bc448e831eba (diff)
downloadsandhi-ecbd0c699884e8da150cfdcab836b1ffd5487f67.tar.gz
sandhi-ecbd0c699884e8da150cfdcab836b1ffd5487f67.tar.bz2
sandhi-ecbd0c699884e8da150cfdcab836b1ffd5487f67.zip
gras: added more GRAS_UNLIKELY in handlers
Diffstat (limited to 'lib/input_handlers.cpp')
-rw-r--r--lib/input_handlers.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/input_handlers.cpp b/lib/input_handlers.cpp
index c82efb3..c9855ec 100644
--- a/lib/input_handlers.cpp
+++ b/lib/input_handlers.cpp
@@ -12,7 +12,7 @@ void BlockActor::handle_input_tag(const InputTagMessage &message, const Theron::
const size_t index = message.index;
//handle incoming stream tag, push into the tag storage
- if (this->block_state == BLOCK_STATE_DONE) return;
+ if GRAS_UNLIKELY(this->block_state == BLOCK_STATE_DONE) return;
this->input_tags[index].push_back(message.tag);
this->input_tags_changed[index] = true;
}
@@ -24,7 +24,7 @@ void BlockActor::handle_input_msg(const InputMsgMessage &message, const Theron::
const size_t index = message.index;
//handle incoming async message, push into the msg storage
- if (this->block_state == BLOCK_STATE_DONE) return;
+ if GRAS_UNLIKELY(this->block_state == BLOCK_STATE_DONE) return;
this->input_msgs[index].push_back(message.msg);
this->update_input_avail(index);
@@ -39,7 +39,7 @@ void BlockActor::handle_input_buffer(const InputBufferMessage &message, const Th
const size_t index = message.index;
//handle incoming stream buffer, push into the queue
- if (this->block_state == BLOCK_STATE_DONE) return;
+ if GRAS_UNLIKELY(this->block_state == BLOCK_STATE_DONE) return;
this->input_queues.push(index, message.buffer);
this->update_input_avail(index);