Ignore:
Timestamp:
Jul 29, 2010, 5:52:10 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
23bbc43
Parents:
a44edd15
Message:

2010-07-29 Gedare Bloom <giddyup44@…>

PR 1635/cpukit

  • sapi/src/exinit.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/bitfield.h, score/include/rtems/score/priority.h, score/include/rtems/score/thread.h, score/inline/rtems/score/priority.inl, score/inline/rtems/score/thread.inl, score/src/threadchangepriority.c, score/src/threadclearstate.c, score/src/threadready.c, score/src/threadresume.c, score/src/threadsetpriority.c, score/src/threadsetstate.c, score/src/threadsettransient.c, score/src/threadsuspend.c: Refactoring of priority handling, to isolate the bitmap implementation of priorities in the supercore so that priority management is a little more modular. This change is in anticipation of scheduler implementations that can select how they manage tracking priority levels / finding the highest priority ready task. Note that most of the changes here are simple renaming, to clarify the use of the bitmap-based priority management.
  • score/include/rtems/score/prioritybitmap.h, score/inline/rtems/score/prioritybitmap.inl: New files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/priority.h

    ra44edd15 ra55e305  
    88
    99/*
    10  *  COPYRIGHT (c) 1989-2006.
     10 *  COPYRIGHT (c) 1989-2010.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    6868
    6969/**
    70  *  The following record defines the information associated with
    71  *  each thread to manage its interaction with the priority bit maps.
    72  */
    73 typedef struct {
    74   /** This is the address of minor bit map slot. */
    75   Priority_Bit_map_control *minor;
    76   /** This is the priority bit map ready mask. */
    77   Priority_Bit_map_control  ready_major;
    78   /** This is the priority bit map ready mask. */
    79   Priority_Bit_map_control  ready_minor;
    80   /** This is the priority bit map block mask. */
    81   Priority_Bit_map_control  block_major;
    82   /** This is the priority bit map block mask. */
    83   Priority_Bit_map_control  block_minor;
    84 }   Priority_Information;
    85 
    86 /**
    8770 *  This variable contains the configured number of priorities
    8871 */
    8972extern uint8_t rtems_maximum_priority;
    90 
    91 /**
    92  *  Each sixteen bit entry in this array is associated with one of
    93  *  the sixteen entries in the Priority Bit map.
    94  */
    95 SCORE_EXTERN volatile Priority_Bit_map_control _Priority_Major_bit_map;
    96 
    97 /** Each bit in the Priority Bitmap indicates whether or not there are
    98  *  threads ready at a particular priority.  The mapping of
    99  *  individual priority levels to particular bits is processor
    100  *  dependent as is the value of each bit used to indicate that
    101  *  threads are ready at that priority.
    102  */
    103 SCORE_EXTERN Priority_Bit_map_control
    104                _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
    105 
    106 /*
    107  *  The definition of the Priority_Bit_map_control type is CPU dependent.
    108  *
    109  */
    110 
    111 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
    112 /**
    113  *  This method returns the priority bit mask for the specified major
    114  *  or minor bit number.
    115  *
    116  *  @param[in] _bit_number is the bit number for which we need a mask
    117  *
    118  *  @return the priority bit mask
    119  *
    120  *  @note This may simply be a pass through to a CPU dependent implementation.
    121  */
    122 #define _Priority_Mask( _bit_number ) \
    123   _CPU_Priority_Mask( _bit_number )
    124 #endif
    125 
    126 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE )
    127 /**
    128  *  This method returns the bit index position for the specified priority.
    129  *
    130  *  @param[in] _priority is the priority for which we need the index.
    131  *
    132  *  @return This method returns the array index into the priority bit map.
    133  *
    134  *  @note This may simply be a pass through to a CPU dependent implementation.
    135  */
    136 #define _Priority_Bits_index( _priority ) \
    137   _CPU_Priority_bits_index( _priority )
    138 #endif
    13973
    14074#ifndef __RTEMS_APPLICATION__
Note: See TracChangeset for help on using the changeset viewer.