summaryrefslogtreecommitdiff
path: root/lib/gras_impl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gras_impl')
-rw-r--r--lib/gras_impl/block_actor.hpp3
-rw-r--r--lib/gras_impl/block_data.hpp4
-rw-r--r--lib/gras_impl/debug.hpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp
index 360c352..90e96bb 100644
--- a/lib/gras_impl/block_actor.hpp
+++ b/lib/gras_impl/block_actor.hpp
@@ -18,7 +18,6 @@ struct BlockActor : Theron::Actor
{
BlockActor(const ThreadPool &tp = ThreadPool());
~BlockActor(void);
- Block *block_ptr;
std::string name; //for debug
ThreadPool thread_pool;
Token prio_token;
@@ -104,7 +103,7 @@ struct BlockActor : Theron::Actor
//work helpers
inline void task_work(void)
{
- block_ptr->work(data->input_items, data->output_items);
+ data->block->work(data->input_items, data->output_items);
}
//property stuff
diff --git a/lib/gras_impl/block_data.hpp b/lib/gras_impl/block_data.hpp
index 9fbf3eb..4b6e8de 100644
--- a/lib/gras_impl/block_data.hpp
+++ b/lib/gras_impl/block_data.hpp
@@ -3,6 +3,7 @@
#ifndef INCLUDED_LIBGRAS_IMPL_BLOCK_DATA_HPP
#define INCLUDED_LIBGRAS_IMPL_BLOCK_DATA_HPP
+#include <gras/block.hpp>
#include <gras_impl/debug.hpp>
#include <gras_impl/bitset.hpp>
#include <gras_impl/token.hpp>
@@ -33,6 +34,9 @@ enum BlockState
struct BlockData
{
+ //block pointer to call into parent
+ Block *block;
+
//per port properties
std::vector<InputPortConfig> input_configs;
std::vector<OutputPortConfig> output_configs;
diff --git a/lib/gras_impl/debug.hpp b/lib/gras_impl/debug.hpp
index 04480d8..eb09090 100644
--- a/lib/gras_impl/debug.hpp
+++ b/lib/gras_impl/debug.hpp
@@ -48,7 +48,7 @@ extern void *operator new(std::size_t n) throw (std::bad_alloc);
#define VAR(x) std::cerr << #x << " = " << (x) << std::endl << std::flush;
#ifdef MESSAGE_TRACING
-#define MESSAGE_TRACER() std::cerr << block_ptr->to_string() << " in " << BOOST_CURRENT_FUNCTION << std::endl << std::flush;
+#define MESSAGE_TRACER() std::cerr << name << " in " << BOOST_CURRENT_FUNCTION << std::endl << std::flush;
#else
#define MESSAGE_TRACER()
#endif