diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | chopstx.c | 4 |
2 files changed, 5 insertions, 1 deletions
@@ -3,7 +3,7 @@ * chopstx.c (chopstx_intr_wait): Rename from chopstx_wait_intr. (chopstx_usec_wait): Rename from chosptx_usleep. (chopstx_cancel, chopstx_testcancel): New. - (idle): Moved from entry.c and use WFI. + (idle): Moved from entry.c and use WFI if USE_WFI_FOR_IDLE. 2013-05-27 Niibe Yutaka <gniibe@fsij.org> @@ -292,8 +292,12 @@ chx_ready_enqueue (struct chx_thread *tp) static void __attribute__((naked, used)) idle (void) { +#if defined(USE_WFI_FOR_IDLE) for (;;) asm volatile ("wfi" : : : "memory"); +#else + for (;;); +#endif } |