RTEMS Logo

RTEMS 4.9.1 On-Line Library


IDLE Thread CPU_PROVIDES_IDLE_THREAD_BODY Macro Setting

PREV UP NEXT Bookshelf RTEMS Porting Guide

7.2.1: CPU_PROVIDES_IDLE_THREAD_BODY Macro Setting

The CPU_PROVIDES_IDLE_THREAD_BODY macro setting is based upon the answer to the question: Does this port provide a CPU dependent IDLE task implementation? If the answer to this question is yes, then the CPU_PROVIDES_IDLE_THREAD_BODY macro should be set to TRUE, and the routine _CPU_Thread_Idle_body must be provided. This routine overrides the default IDLE thread body of _Thread_Idle_body. If the CPU_PROVIDES_IDLE_THREAD_BODY macro is set to FALSE, then the generic _Thread_Idle_body is the default IDLE thread body for this port. Regardless of whether or not a CPU dependent IDLE thread implementation is provided, the BSP can still override it.

This is intended to allow for supporting processors which have a low power or idle mode. When the IDLE thread is executed, then the CPU can be powered down when the processor is idle.

The order of precedence for selecting the IDLE thread body is:

  1. BSP provided
  2. CPU dependent (if provided)
  3. generic (if no BSP and no CPU dependent)

The following illustrates setting the CPU_PROVIDES_IDLE_THREAD_BODY macro:

#define CPU_PROVIDES_IDLE_THREAD_BODY    TRUE

Implementation details of a CPU model specific IDLE thread body are in the next section.


PREV UP NEXT Bookshelf RTEMS Porting Guide

Copyright © 1988-2008 OAR Corporation