21 #ifndef _RTEMS_SCORE_PRIORITYBITMAPIMPL_H 22 #define _RTEMS_SCORE_PRIORITYBITMAPIMPL_H 62 unsigned int bit_number;
64 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) 66 #elif defined(__GNUC__) 67 bit_number = (
unsigned int) __builtin_clz( value )
68 - __SIZEOF_INT__ * __CHAR_BIT__ + 16;
70 if ( value < 0x100 ) {
89 unsigned int bit_number
92 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) 95 return (Priority_bit_map_Word) ( 0x8000u >> bit_number );
108 unsigned int bit_number
111 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) 112 return _CPU_Priority_bits_index( bit_number );
127 return the_priority / 16;
139 return the_priority % 16;
151 memset( bit_map, 0,
sizeof( *bit_map ) );
185 if ( *bit_map_info->
minor == 0 )
237 unsigned int new_priority
242 Priority_bit_map_Word mask;
251 bit_map_info->
block_major = (Priority_bit_map_Word) ~mask;
255 bit_map_info->
block_minor = (Priority_bit_map_Word) ~mask;
RTEMS_INLINE_ROUTINE unsigned int _Priority_Major(unsigned int the_priority)
Returns the major portion of the_priority.
Definition: prioritybitmapimpl.h:125
Definition: prioritybitmap.h:42
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add(Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info)
Adds Priority queue bit map information.
Definition: prioritybitmapimpl.h:162
Priority_bit_map_Word bit_map[16]
Each bit in the bit map indicates whether or not there are threads ready at a particular priority.
Definition: prioritybitmap.h:57
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove(Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info)
Removes Priority queue bit map information.
Definition: prioritybitmapimpl.h:179
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize(Priority_bit_map_Control *bit_map)
Initializes a bit map.
Definition: prioritybitmapimpl.h:147
#define _CPU_Bitfield_Find_first_bit(_value, _output)
Definition: cpu.h:932
RTEMS_INLINE_ROUTINE unsigned int _Priority_Minor(unsigned int the_priority)
Returns the minor portion of the_priority.
Definition: prioritybitmapimpl.h:137
RTEMS_INLINE_ROUTINE unsigned int _Priority_bit_map_Get_highest(const Priority_bit_map_Control *bit_map)
Gets highest portion of Priority queue bit map.
Definition: prioritybitmapimpl.h:196
Priority_bit_map_Word major_bit_map
Each sixteen bit entry in this word is associated with one of the sixteen entries in the bit map.
Definition: prioritybitmap.h:47
Manipulation Routines for the Bitmap Priority Queue Implementation.
RTEMS_INLINE_ROUTINE Priority_bit_map_Word _Priority_Mask(unsigned int bit_number)
Returns the priority bit mask for the specified major or minor bit number.
Definition: prioritybitmapimpl.h:88
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Initialize_information(Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info, unsigned int new_priority)
Initializes the bit map information.
Definition: prioritybitmapimpl.h:234
#define _CPU_Priority_Mask(_bit_number)
Definition: cpu.h:953
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
const unsigned char _Bitfield_Leading_zeros[256]
Definition: log2table.c:24
RTEMS_INLINE_ROUTINE bool _Priority_bit_map_Is_empty(const Priority_bit_map_Control *bit_map)
Checks if the Priority queue bit map is empty.
Definition: prioritybitmapimpl.h:218
RTEMS_INLINE_ROUTINE unsigned int _Priority_Bits_index(unsigned int bit_number)
Returns the bit index position for the specified major or minor bit number.
Definition: prioritybitmapimpl.h:107
RTEMS_INLINE_ROUTINE unsigned int _Bitfield_Find_first_bit(unsigned int value)
Returns the bit number of the first bit set in the specified value.
Definition: prioritybitmapimpl.h:58