Commit 13acca65 authored by Dorel Coman's avatar Dorel Coman Committed by Oliver Horst
Browse files

memguard: cleaned code and improved comments

parent c9fe2c88
......@@ -533,11 +533,6 @@ void memguard_task_switch_out()
#endif
}
void *memguard_get_memguard_task_handle()
{
return memguard_task_handle;
}
/**
* The task sets up memguard, doing the remaining operations which can be done
* only inside a Task context. The interrupts and the timer cannot be setup
......@@ -927,9 +922,11 @@ static void memguard_overflow_interrupt_handler(void *callback_ref)
return;
}
/* We didn't use all the ass_budget but there is no global_budget as it was
already taken by other tasks. We allow the task to continue, hoping
that it may use more bandwidth until the window is reset */
/* We donated some budget at the beginning of the window and we already
finished the assigned bandwidth. The problem is that the donated budget
was already used by other tasks and we cannot claim more bandwidth which
should be of our task. We allow the task to continue, expecting it to use
some bandwidth until the end of the window. */
if (task_info->curr_used_budget < task_info->ass_budget){
task_info->cur_ass_budget = 0;
......@@ -943,8 +940,8 @@ static void memguard_overflow_interrupt_handler(void *callback_ref)
/* The task will be free to try to use some bandwidth until the end of
the window; we are collecting info of how much bandwidth it is
using to know how much to allocate it at the beginning of the
next window */
using to know how much to allocate it at the beginning of the
next window */
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment