From 709f8e97cc642e446d357612a6d6512d5a4c5330 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 4 Oct 2012 21:15:11 -0700 Subject: implementation for the top block global config --- lib/top_block.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/top_block.cpp') diff --git a/lib/top_block.cpp b/lib/top_block.cpp index c93bda5..4973b59 100644 --- a/lib/top_block.cpp +++ b/lib/top_block.cpp @@ -53,6 +53,16 @@ void ElementImpl::top_block_cleanup(void) << std::flush; } +GlobalBlockConfig TopBlock::global_config(void) const +{ + return (*this)->top_config; +} + +void TopBlock::set_global_config(const GlobalBlockConfig &config) +{ + (*this)->top_config = config; +} + void TopBlock::commit(void) { this->start(); //ok to re-start, means update @@ -69,6 +79,10 @@ void TopBlock::start(void) message.token = (*this)->token; (*this)->executor->post_all(message); } + { + //send the global block config before alloc + (*this)->executor->post_all((*this)->top_config); + } { (*this)->executor->post_all(TopAllocMessage()); } -- cgit