19 #ifndef _RTEMS_SCORE_PRIORITYBITMAPIMPL_H 20 #define _RTEMS_SCORE_PRIORITYBITMAPIMPL_H 36 #if ( CPU_USE_GENERIC_BITFIELD_DATA == TRUE ) 66 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) 67 #define _Bitfield_Find_first_bit( _value, _bit_number ) \ 68 _CPU_Bitfield_Find_first_bit( _value, _bit_number ) 70 #define _Bitfield_Find_first_bit( _value, _bit_number ) \ 72 register uint32_t __value = (uint32_t) (_value); \ 73 register const unsigned char *__p = __log2table; \ 75 if ( __value < 0x100 ) \ 76 (_bit_number) = (Priority_bit_map_Word)( __p[ __value ] + 8 ); \ 78 (_bit_number) = (Priority_bit_map_Word)( __p[ __value >> 8 ] ); \ 82 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) 93 #define _Priority_Mask( _bit_number ) \ 94 _CPU_Priority_Mask( _bit_number ) 97 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) 107 #define _Priority_Bits_index( _priority ) \ 108 _CPU_Priority_bits_index( _priority ) 119 return (Priority_bit_map_Word)( the_priority / 16 );
130 return (Priority_bit_map_Word)( the_priority % 16 );
133 #if ( CPU_USE_GENERIC_BITFIELD_CODE == TRUE ) 144 return (Priority_bit_map_Word)(0x8000u >> bit_number);
155 return (Priority_bit_map_Word)(~mask);
177 memset( bit_map, 0,
sizeof( *bit_map ) );
199 if ( *bit_map_info->
minor == 0 )
207 Priority_bit_map_Word minor;
208 Priority_bit_map_Word major;
211 Priority_bit_map_Word tmp;
216 tmp = bit_map->
bit_map[ major ];
236 Priority_bit_map_Word major;
237 Priority_bit_map_Word minor;
238 Priority_bit_map_Word mask;
248 bit_map_info->
block_major = (Priority_bit_map_Word)(~((uint32_t)mask));
253 bit_map_info->
block_minor = (Priority_bit_map_Word)(~((uint32_t)mask));
Thread Priority Manipulation Routines.
const unsigned char __log2table[256]
This table is used by the generic bitfield routines to perform a highly optimized bit scan without th...
Definition: log2table.c:25
#define _Priority_Bits_index(_priority)
This method returns the bit index position for the specified priority.
Definition: prioritybitmapimpl.h:107
#define _Bitfield_Find_first_bit(_value, _bit_number)
Gets the _bit_number of the first bit set in the specified value.
Definition: prioritybitmapimpl.h:67
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
Definition: prioritybitmap.h:40
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:55
RTEMS_INLINE_ROUTINE Priority_bit_map_Word _Priority_Mask_invert(uint32_t mask)
This function returns the mask bit inverted.
Definition: prioritybitmapimpl.h:151
uint32_t Priority_Control
The following type defines the control block used to manage thread priorities.
Definition: priority.h:56
RTEMS_INLINE_ROUTINE Priority_bit_map_Word _Priority_Minor(Priority_Control the_priority)
This function returns the minor portion of the_priority.
Definition: prioritybitmapimpl.h:126
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.
Definition: prioritybitmapimpl.h:184
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:45
Manipulation Routines for the Bitmap Priority Queue Implementation.
RTEMS_INLINE_ROUTINE Priority_bit_map_Word _Priority_Major(Priority_Control the_priority)
This function returns the major portion of the_priority.
Definition: prioritybitmapimpl.h:115
#define _Priority_Mask(_bit_number)
This method returns the priority bit mask for the specified major or minor bit number.
Definition: prioritybitmapimpl.h:93