diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2013-05-28 15:25:09 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2013-05-28 15:25:09 +0900 |
commit | 62d20a323fb38d7788a8093a5a0fba910557647d (patch) | |
tree | ccdcb6bc51d08d1686679c3cf70f1ce1c239aea8 | |
parent | 6c1bfe000b0dff90d2e6e4e107093de1aebf85a8 (diff) |
conditionalize wfi use
-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 } |