Skip to content

Commit

Permalink
making the idle function efficient by using WFE instead empty while
Browse files Browse the repository at this point in the history
  • Loading branch information
maiabozaid committed Jul 12, 2023
1 parent dcf4bab commit 921a622
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion machines/cortex/tpl_machine_cortex.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,10 @@ FUNC(uint8, OS_CODE) tpl_check_stack_footprint(CONST(tpl_proc_id, OS_APPL_DATA)
*/
void idle_function(void)
{
while(1);
while(1)
{
__WFE();
}
}

void tpl_init_machine()
Expand Down

0 comments on commit 921a622

Please sign in to comment.