RTEMS Logo

RTEMS 4.9.3 On-Line Library


Priority Bitmap Manipulation Build Bit Field Mask

PREV UP NEXT Bookshelf RTEMS Porting Guide

8.4: Build Bit Field Mask

The _CPU_Priority_Mask routine builds the mask that corresponds to the bit fields searched by _CPU_Bitfield_Find_first_bit(). See the discussion of that routine for more details.

The following is a typical implementation when the _CPU_Bitfield_Find_first_bit searches for the most significant bit set:

#if (CPU_USE_GENERIC_BITFIELD_CODE == FALSE)
#define _CPU_Priority_Mask( _bit_number ) \
  ( 1 << (_bit_number) )
#endif


PREV UP NEXT Bookshelf RTEMS Porting Guide

Copyright © 1988-2008 OAR Corporation