summaryrefslogtreecommitdiff
path: root/lib/block_handlers.cpp
diff options
context:
space:
mode:
authorJosh Blum2013-09-15 22:01:30 -0700
committerJosh Blum2013-09-15 22:01:30 -0700
commitc4b43b3521f373bc91cd3165b96ced0cb9cf65c1 (patch)
tree68254ad7bd602e3de98b441ff7e22f050dd73dee /lib/block_handlers.cpp
parent3cf31976f415aaa3799edd307e40bc2e25f3e690 (diff)
parent75d2c6cc485714efe4b136ade34e78a7b0fb2744 (diff)
downloadsandhi-c4b43b3521f373bc91cd3165b96ced0cb9cf65c1.tar.gz
sandhi-c4b43b3521f373bc91cd3165b96ced0cb9cf65c1.tar.bz2
sandhi-c4b43b3521f373bc91cd3165b96ced0cb9cf65c1.zip
Merge branch 'config_work' into gr_update
Diffstat (limited to 'lib/block_handlers.cpp')
-rw-r--r--lib/block_handlers.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/lib/block_handlers.cpp b/lib/block_handlers.cpp
index ca1ad97..57e24c1 100644
--- a/lib/block_handlers.cpp
+++ b/lib/block_handlers.cpp
@@ -83,29 +83,19 @@ void BlockActor::handle_top_config(
const Theron::Address from
){
MESSAGE_TRACER();
- const GlobalBlockConfig &config = message.config;
+
+ //merge in the non-defaults
+ data->block->global_config().merge(message.config);
//overwrite with global config only if maxium_items is not set (zero)
for (size_t i = 0; i < data->output_configs.size(); i++)
{
if (data->output_configs[i].maximum_items == 0)
{
- data->output_configs[i].maximum_items = config.maximum_output_items;
+ data->output_configs[i].maximum_items = data->block->global_config().maximum_output_items;
}
}
- //overwrite with global node affinity setting for buffers if not set
- if (data->global_config.buffer_affinity == -1)
- {
- data->global_config.buffer_affinity = config.buffer_affinity;
- }
-
- //overwrite with global interruptable setting for work if not set
- if (data->global_config.interruptible_work == false)
- {
- data->global_config.interruptible_work = config.interruptible_work;
- }
-
this->Send(0, from); //ACK
}
@@ -120,7 +110,7 @@ void BlockActor::handle_top_thread_group(
//spawn a new thread if this block is a source
data->thread_group = message.thread_group;
data->interruptible_thread.reset(); //erase old one
- if (data->global_config.interruptible_work)
+ if (data->block->global_config().interruptible_work)
{
data->interruptible_thread = boost::make_shared<InterruptibleThread>(
data->thread_group, boost::bind(&BlockActor::task_work, this)