summaryrefslogtreecommitdiff
path: root/lib/block_handlers.cpp
diff options
context:
space:
mode:
authorJosh Blum2013-03-17 14:19:24 -0700
committerJosh Blum2013-03-17 14:19:24 -0700
commit61f2af4f8287665d91478575793399043e6c00f7 (patch)
tree5425d32643ab1a87fc8fa692a9d7ac2b72c912a3 /lib/block_handlers.cpp
parentcebd974738fea792f70bca8ab0bb1d73e2116d81 (diff)
downloadsandhi-61f2af4f8287665d91478575793399043e6c00f7.tar.gz
sandhi-61f2af4f8287665d91478575793399043e6c00f7.tar.bz2
sandhi-61f2af4f8287665d91478575793399043e6c00f7.zip
gras: helper function for high prio hack
Diffstat (limited to 'lib/block_handlers.cpp')
-rw-r--r--lib/block_handlers.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/block_handlers.cpp b/lib/block_handlers.cpp
index a3e030a..9865331 100644
--- a/lib/block_handlers.cpp
+++ b/lib/block_handlers.cpp
@@ -31,11 +31,11 @@ void BlockActor::handle_top_inert(
){
MESSAGE_TRACER();
- ASSERT(this->prio_count.Load() != 0);
- this->prio_count.Decrement();
this->mark_done();
this->Send(0, from); //ACK
+
+ this->highPrioAck();
}
void BlockActor::handle_top_token(
@@ -136,13 +136,12 @@ void BlockActor::handle_get_stats(
const Theron::Address from
){
MESSAGE_TRACER();
- this->prio_count.Decrement();
+
GetStatsMessage message;
message.block_id = this->block_ptr->to_string();
message.stats = this->stats;
message.stats_time = time_now();
this->Send(message, from); //ACK
- //high prio message may have deferred handle task
- this->handle_task();
+ this->highPrioAck();
}