diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2013-05-28 11:00:52 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2013-05-28 11:00:52 +0900 |
commit | 6c1bfe000b0dff90d2e6e4e107093de1aebf85a8 (patch) | |
tree | a124fa5796ce02765fd5bf5711013cef97c1de50 | |
parent | 699344840b7bebfeedccdda79a1144fc576b7ceb (diff) |
idle implementation.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | chopstx.c | 8 | ||||
-rw-r--r-- | entry.c | 7 |
3 files changed, 9 insertions, 7 deletions
@@ -3,6 +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. 2013-05-27 Niibe Yutaka <gniibe@fsij.org> @@ -289,6 +289,14 @@ chx_ready_enqueue (struct chx_thread *tp) chx_UNLOCK (&q_ready.lock); } +static void __attribute__((naked, used)) +idle (void) +{ + for (;;) + asm volatile ("wfi" : : : "memory"); +} + + /* Registers on stack (PSP): r0, r1, r2, r3, r12, lr, pc, xpsr */ static void __attribute__ ((naked,used)) sched (void) @@ -294,13 +294,6 @@ void entry (void) : /* no output */ : /* no input */ : "memory"); } -void __attribute__((naked, used)) -idle (void) -{ - /* XXX: use WFI */ - for (;;); -} - typedef void (*handler)(void); extern uint8_t __main_stack_end__; |