aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--chopstx.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index bca0c87..77cea14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
diff --git a/chopstx.c b/chopstx.c
index e2804cd..a624012 100644
--- a/chopstx.c
+++ b/chopstx.c
@@ -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
}