19 #ifndef _RTEMS_SCORE_PRIORITYBITMAPIMPL_H 20 #define _RTEMS_SCORE_PRIORITYBITMAPIMPL_H 59 unsigned int bit_number;
61 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) 63 #elif defined(__GNUC__) 64 bit_number = (
unsigned int) __builtin_clz( value )
65 - __SIZEOF_INT__ * __CHAR_BIT__ + 16;
67 if ( value < 0x100 ) {
68 bit_number = _Bitfield_Leading_zeros[ value ] + 8;
70 bit_number = _Bitfield_Leading_zeros[ value >> 8 ];
86 unsigned int bit_number
89 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) 92 return (Priority_bit_map_Word) ( 0x8000u >> bit_number );
105 unsigned int bit_number
108 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) 109 return _CPU_Priority_bits_index( bit_number );
121 return the_priority / 16;
130 return the_priority % 16;
137 memset( bit_map, 0,
sizeof( *bit_map ) );
159 if ( *bit_map_info->
minor == 0 )
187 unsigned int new_priority
192 Priority_bit_map_Word mask;
201 bit_map_info->
block_major = (Priority_bit_map_Word) ~mask;
205 bit_map_info->
block_minor = (Priority_bit_map_Word) ~mask;
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:104
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
Definition: prioritybitmap.h:37
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:52
RTEMS_INLINE_ROUTINE unsigned int _Priority_Minor(unsigned int the_priority)
Definition: prioritybitmapimpl.h:128
const unsigned char _Bitfield_Leading_zeros[256]
Definition: log2table.c:24
#define _CPU_Bitfield_Find_first_bit(_value, _output)
Definition: cpu.h:924
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add(Priority_bit_map_Control *bit_map, Priority_bit_map_Information *bit_map_info)
Definition: prioritybitmapimpl.h:144
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:55
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:42
Manipulation Routines for the Bitmap Priority Queue Implementation.
RTEMS_INLINE_ROUTINE unsigned int _Priority_Major(unsigned int the_priority)
Definition: prioritybitmapimpl.h:119
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:85
#define _CPU_Priority_Mask(_bit_number)
Definition: cpu.h:945