diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-07-20 09:07:40 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-07-25 10:07:43 +0200 |
commit | c2670deb496d2535bcdb67705b046530c8a6b49a (patch) | |
tree | f39fe22704a156a2a1b248e0ad4d24f33ca2736c /cpukit/score/cpu | |
parent | bsps/riscv: Update linker-symbols.h (diff) | |
download | rtems-c2670deb496d2535bcdb67705b046530c8a6b49a.tar.bz2 |
riscv: Use wfi instruction for idle task
Update #3433.
Diffstat (limited to 'cpukit/score/cpu')
-rw-r--r-- | cpukit/score/cpu/riscv/cpu.c | 5 | ||||
-rw-r--r-- | cpukit/score/cpu/riscv/include/rtems/score/cpu.h | 10 |
2 files changed, 3 insertions, 12 deletions
diff --git a/cpukit/score/cpu/riscv/cpu.c b/cpukit/score/cpu/riscv/cpu.c index 64eef969b7..62150d4ea5 100644 --- a/cpukit/score/cpu/riscv/cpu.c +++ b/cpukit/score/cpu/riscv/cpu.c @@ -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; } diff --git a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h index 724385cd75..039595dd4b 100644 --- a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h +++ b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h @@ -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 ); /* |