summaryrefslogtreecommitdiff
path: root/lib/gras_impl/block_actor.hpp
diff options
context:
space:
mode:
authorJosh Blum2012-11-05 22:59:47 -0800
committerJosh Blum2012-11-05 22:59:47 -0800
commit37a863991f5e05035cce6738379de7a8ebc2b160 (patch)
treec7f2c7732074d69f1b3fe147f5fb32d92c34c9c8 /lib/gras_impl/block_actor.hpp
parented68f79a7a2e3c1bdbe0a2b4c5498ac29e431cce (diff)
downloadsandhi-37a863991f5e05035cce6738379de7a8ebc2b160.tar.gz
sandhi-37a863991f5e05035cce6738379de7a8ebc2b160.tar.bz2
sandhi-37a863991f5e05035cce6738379de7a8ebc2b160.zip
polish up work and notify api
There is a formal api to mark done, and IO failures. Notify topology was created for consistency. So far, there output fail is unimplemented, and input fail requires an additional check.
Diffstat (limited to 'lib/gras_impl/block_actor.hpp')
-rw-r--r--lib/gras_impl/block_actor.hpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp
index 18c13e2..67e1815 100644
--- a/lib/gras_impl/block_actor.hpp
+++ b/lib/gras_impl/block_actor.hpp
@@ -101,6 +101,7 @@ struct BlockActor : Apology::Worker
void mark_done(void);
void handle_task(void);
void input_fail(const size_t index);
+ void output_fail(const size_t index);
void sort_tags(const size_t index);
void trim_tags(const size_t index);
GRAS_FORCE_INLINE bool any_inputs_done(void)
@@ -126,17 +127,9 @@ struct BlockActor : Apology::Worker
std::vector<uint64_t> items_consumed;
std::vector<uint64_t> items_produced;
- //work buffers for the classic interface
- size_t work_noutput_items;
- std::vector<const void *> work_input_items;
- std::vector<void *> work_output_items;
- std::vector<int> work_ninput_items;
- std::vector<int> fcast_ninput_items;
-
//work buffers for the new work interface
Block::InputItems input_items;
Block::OutputItems output_items;
- ptrdiff_t work_io_ptr_mask;
//track work's calls to produce and consume
std::vector<size_t> produce_items;
@@ -164,10 +157,9 @@ struct BlockActor : Apology::Worker
boost::shared_ptr<InterruptibleThread> interruptible_thread;
//work helpers
- int work_ret;
inline void task_work(void)
{
- this->work_ret = block_ptr->work(this->input_items, this->output_items);
+ block_ptr->work(this->input_items, this->output_items);
}
//is the fg running?