We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb33d96 commit 6a8744aCopy full SHA for 6a8744a
kernel/task.c
@@ -302,7 +302,10 @@ void dispatch(void)
302
if (hal_context_save(((tcb_t *) kcb->task_current->data)->context) != 0)
303
return;
304
305
- task_stack_check();
+ /* Do stack check less frequently to reduce overhead */
306
+ if (unlikely((kcb->ticks & (STACK_CHECK_INTERVAL - 1)) == 0))
307
+ task_stack_check();
308
+
309
list_foreach(kcb->tasks, delay_update, NULL);
310
311
/* Hook for real-time scheduler - if it selects a task, use it */
0 commit comments