RTEMS CPU Kit with SuperCore  4.10.99.0
Defines | Typedefs | Functions | Variables
Priority Handler
SuperCore

This handler encapsulates functionality which is used to manage thread priorities. More...

Collaboration diagram for Priority Handler:

Defines

#define PRIORITY_MINIMUM   0
 This defines the highest (most important) thread priority.
#define PRIORITY_DEFAULT_MAXIMUM   255
 This defines the default lowest (least important) thread priority.
#define PRIORITY_MAXIMUM   rtems_maximum_priority
 This defines the lowest (least important) thread priority.
#define _Bitfield_Find_first_bit(_value, _bit_number)   _CPU_Bitfield_Find_first_bit( _value, _bit_number )
 Gets the _bit_number of the first bit set in the specified value.
#define _Priority_Mask(_bit_number)   _CPU_Priority_Mask( _bit_number )
 This method returns the priority bit mask for the specified major or minor bit number.
#define _Priority_Bits_index(_priority)   _CPU_Priority_bits_index( _priority )
 This method returns the bit index position for the specified priority.

Typedefs

typedef uint32_t Priority_Control
 The following type defines the control block used to manage thread priorities.

Functions

RTEMS_INLINE_ROUTINE
Priority_bit_map_Word 
_Priority_Major (Priority_Control the_priority)
 This function returns the major portion of the_priority.
RTEMS_INLINE_ROUTINE
Priority_bit_map_Word 
_Priority_Minor (Priority_Control the_priority)
 This function returns the minor portion of the_priority.
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize (Priority_bit_map_Control *bit_map)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add (Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info)
 Priority Queue implemented by bit map.
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info)
RTEMS_INLINE_ROUTINE
Priority_Control 
_Priority_bit_map_Get_highest (const Priority_bit_map_Control *bit_map)
RTEMS_INLINE_ROUTINE bool _Priority_bit_map_Is_empty (const Priority_bit_map_Control *bit_map)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize_information (Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info, Priority_Control new_priority)

Variables

uint8_t rtems_maximum_priority
 This variable contains the configured number of priorities.

Detailed Description

This handler encapsulates functionality which is used to manage thread priorities.

At the SuperCore level 256 priority levels are supported with lower numbers representing logically more important threads. The priority level 0 is reserved for internal RTEMS use. Typically it is assigned to threads which defer internal RTEMS actions from an interrupt to thread level to improve interrupt response. Priority level 255 is assigned to the IDLE thread and really should not be used by application threads. The default IDLE thread implementation is an infinite "branch to self" loop which never yields to other threads at the same priority.


Define Documentation

#define _Bitfield_Find_first_bit (   _value,
  _bit_number 
)    _CPU_Bitfield_Find_first_bit( _value, _bit_number )

Gets the _bit_number of the first bit set in the specified value.

This routine returns the _bit_number of the first bit set in the specified value. The correspondence between _bit_number and actual bit position is processor dependent. The search for the first bit set may run from most to least significant bit or vice-versa.

Parameters:
[in]_valueis the value to bit scan.
[in]_bit_numberis the position of the first bit set.
Note:
This routine is used when the executing thread is removed from the ready state and, as a result, its performance has a significant impact on the performance of the executive as a whole.
This routine must be a macro because if a CPU specific version is used it will most likely use inline assembly.
#define _Priority_Bits_index (   _priority)    _CPU_Priority_bits_index( _priority )

This method returns the bit index position for the specified priority.

Parameters:
[in]_priorityis the priority for which we need the index.
Return values:
Thismethod returns the array index into the priority bit map.
Note:
This may simply be a pass through to a CPU dependent implementation.
#define _Priority_Mask (   _bit_number)    _CPU_Priority_Mask( _bit_number )

This method returns the priority bit mask for the specified major or minor bit number.

Parameters:
[in]_bit_numberis the bit number for which we need a mask
Return values:
thepriority bit mask
Note:
This may simply be a pass through to a CPU dependent implementation.
#define PRIORITY_DEFAULT_MAXIMUM   255

This defines the default lowest (least important) thread priority.

#define PRIORITY_MAXIMUM   rtems_maximum_priority

This defines the lowest (least important) thread priority.

Referenced by _Scheduler_priority_Ready_queue_initialize().

#define PRIORITY_MINIMUM   0

This defines the highest (most important) thread priority.


Typedef Documentation

typedef uint32_t Priority_Control

The following type defines the control block used to manage thread priorities.

Note:
Priority 0 is reserved for internal threads only.