riscv: Use wfi instruction for idle task

Update #3433.
This commit is contained in:
Sebastian Huber
2018-07-20 09:07:40 +02:00
parent f5fd8eb9e3
commit c2670deb49
2 changed files with 3 additions and 12 deletions

View File

@@ -204,8 +204,9 @@ uint32_t _CPU_ISR_Get_level( void )
void *_CPU_Thread_Idle_body( uintptr_t ignored )
{
do {
} while (1);
while ( true ) {
__asm__ volatile ( "wfi" );
}
return NULL;
}

View File

@@ -360,16 +360,6 @@ void _CPU_Initialize(
void
);
/*
* _CPU_Thread_Idle_body
*
* This routine is the CPU dependent IDLE thread body.
*
* NOTE: It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
* is TRUE.
*
*/
void *_CPU_Thread_Idle_body( uintptr_t ignored );
/*