Main Loop Processing

Collaboration diagram for Main Loop Processing:

Modules

 Work Queue Processing

Functions

static __noreturn void mainloop_run (struct workqueue *queue)
 Run the main loop.
static void cpu_enter_sleep (void)
 Enter the deepest possible sleep mode.

Function Documentation

void cpu_enter_sleep ( void   )  [inline, static]

Enter the deepest possible sleep mode.

Todo:
Currently, this function does nothing. We probably want to at least enter Idle mode when the workqueue is empty.

This function will determine the lowest possible sleep mode that can safely be entered, enable interrupts and put the chip into that sleep mode. This will all happen atomically, so no interrupts will be handled before the sleep instruction has been executed.

Todo:
Currently, no sleep modes deeper than Idle will be entered. Deeper sleep modes will require a proper sleep manager to be implemented and supported by all drivers.
Precondition:
Interrupts are disabled
Postcondition:
Interrupts are enabled

Definition at line 50 of file sleep.h.

References cpu_irq_enable.

Referenced by mainloop_run().

static __noreturn void mainloop_run ( struct workqueue queue  )  [inline, static]

Run the main loop.

This function will loop forever processing work queues and soft interrupts.

Note:
This function will enable interrupts unconditionally before processing any work queue tasks.

Definition at line 63 of file mainloop.h.

References assert, cpu_enter_sleep(), cpu_irq_disable, cpu_irq_enable, softirq_is_enabled(), softirq_poll(), workqueue_pop_task(), and workqueue_run_task().

Referenced by main().

Generated on Thu Apr 29 14:10:35 2010 for xplain-bc by  doxygen 1.6.3