summaryrefslogtreecommitdiff
path: root/lib/input_handlers.cpp
diff options
context:
space:
mode:
authorJosh Blum2012-11-24 20:38:13 -0800
committerJosh Blum2012-11-24 20:38:13 -0800
commitc5162cd3e2f21888b82ec6d4231ccef1d4b39e30 (patch)
treee3130c01c56c0ecbfa9fe0b912fa7be05dad6f3f /lib/input_handlers.cpp
parenta99591259c22f471fc2dffe137f039bdff7d0ebf (diff)
downloadsandhi-c5162cd3e2f21888b82ec6d4231ccef1d4b39e30.tar.gz
sandhi-c5162cd3e2f21888b82ec6d4231ccef1d4b39e30.tar.bz2
sandhi-c5162cd3e2f21888b82ec6d4231ccef1d4b39e30.zip
created common function is_work_allowed and input check
at least one port needs a tag or an item, this helps the reserve items == 0 case
Diffstat (limited to 'lib/input_handlers.cpp')
-rw-r--r--lib/input_handlers.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/input_handlers.cpp b/lib/input_handlers.cpp
index 0069f5b..6b9fd2d 100644
--- a/lib/input_handlers.cpp
+++ b/lib/input_handlers.cpp
@@ -13,6 +13,7 @@ void BlockActor::handle_input_tag(const InputTagMessage &message, const Theron::
//handle incoming stream tag, push into the tag storage
this->input_tags[index].push_back(message.tag);
this->input_tags_changed[index] = true;
+ this->inputs_available.set(index);
this->handle_task();
}
@@ -24,6 +25,7 @@ void BlockActor::handle_input_buffer(const InputBufferMessage &message, const Th
//handle incoming stream buffer, push into the queue
if (this->block_state == BLOCK_STATE_DONE) return;
this->input_queues.push(index, message.buffer);
+ this->inputs_available.set(index);
this->handle_task();
}