idle implementation.

This commit is contained in:
NIIBE Yutaka
2013-05-28 11:00:52 +09:00
parent 699344840b
commit 6c1bfe000b
3 changed files with 9 additions and 7 deletions

View File

@@ -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)