Commit de2b2c22 authored by schneider's avatar schneider
Browse files

Merge branch 'rahix/fix-reset-button' into 'master'

Fix epic_sleep() calls delaying load of new app

See merge request !484
parents 0f4a515a cf60dfb7
Pipeline #5281 passed with stages
in 56 seconds
......@@ -109,6 +109,9 @@ static int do_load(struct load_info *info)
return -EPERM;
}
/* Signal the dispatcher to return early from applicable API calls. */
xTaskNotifyGive(dispatcher_task_id);
mutex_lock(&api_mutex);
if (info->do_reset) {
......@@ -126,9 +129,17 @@ static int do_load(struct load_info *info)
* call.
*/
while (!core1_is_ready()) {
/*
* Wake up the dispatcher task prematurely. This is needed so
* the second xTaskNotifyGive() below can then break out the
* dispatcher from e.g. an epic_sleep() call.
*/
xTaskNotifyGive(dispatcher_task_id);
mutex_unlock(&api_mutex);
/* Sleep so the dispatcher task can take the lock. */
vTaskDelay(8);
/* Signal the dispatcher to return early from applicable API calls. */
xTaskNotifyGive(dispatcher_task_id);
mutex_lock(&api_mutex);
}
......
Supports Markdown
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