summaryrefslogtreecommitdiff
path: root/lib/block.cpp
diff options
context:
space:
mode:
authorJosh Blum2013-06-06 13:01:04 -0700
committerJosh Blum2013-06-06 13:01:04 -0700
commit7350e18b8d5090349390f54b76a0e251b66ce619 (patch)
tree6ce12ebd668d120823c652f8b09d055a149d70dc /lib/block.cpp
parent3739e119b81f0898755817eff618d45eed7e6692 (diff)
downloadsandhi-7350e18b8d5090349390f54b76a0e251b66ce619.tar.gz
sandhi-7350e18b8d5090349390f54b76a0e251b66ce619.tar.bz2
sandhi-7350e18b8d5090349390f54b76a0e251b66ce619.zip
gras: moved block ptr into data
Diffstat (limited to 'lib/block.cpp')
-rw-r--r--lib/block.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/block.cpp b/lib/block.cpp
index a7b31f7..00238ba 100644
--- a/lib/block.cpp
+++ b/lib/block.cpp
@@ -34,11 +34,12 @@ Block::Block(const std::string &name):
{
//create non-actor containers
(*this)->block_data.reset(new BlockData());
+ (*this)->block_data->block = this;
(*this)->worker.reset(new Apology::Worker());
//create actor and init members
(*this)->block_actor.reset(new BlockActor());
- (*this)->setup_actor(this);
+ (*this)->setup_actor();
//setup some state variables
(*this)->block_data->block_state = BLOCK_STATE_INIT;
@@ -53,11 +54,10 @@ Block::~Block(void)
//NOP
}
-void ElementImpl::setup_actor(Block *block_ptr)
+void ElementImpl::setup_actor(void)
{
this->block_actor->worker = this->worker.get();
this->block_actor->name = name; //for debug purposes
- this->block_actor->block_ptr = block_ptr;
this->block_actor->data = this->block_data;
this->worker->set_actor(this->block_actor.get());
this->thread_pool = this->block_actor->thread_pool; //ref copy of pool
@@ -199,7 +199,7 @@ void Block::set_thread_pool(const ThreadPool &thread_pool)
{
boost::shared_ptr<BlockActor> old_actor = (*this)->block_actor;
(*this)->block_actor.reset(new BlockActor(thread_pool));
- (*this)->setup_actor(this);
+ (*this)->setup_actor();
wait_actor_idle((*this)->repr, *old_actor);
}