Ignore:
Timestamp:
Jun 28, 2019, 6:30:11 AM (5 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
b89d6cc
Parents:
c43071f
Message:

score: Add and use _Thread_Get_unmapped_priority().

Add and use _Thread_Get_unmapped_real_priority().

File:
1 edited

Legend:

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

    rc43071f r5803f37  
    5050 */
    5151#define SCHEDULER_PRIORITY_APPEND_FLAG 1
     52
     53/**
     54 * @brief Maps a priority value to support the append indicator.
     55 */
     56#define SCHEDULER_PRIORITY_MAP( priority ) ( ( priority ) << 1 )
     57
     58/**
     59 * @brief Returns the plain priority value.
     60 */
     61#define SCHEDULER_PRIORITY_UNMAP( priority ) ( ( priority ) >> 1 )
     62
     63/**
     64 * @brief Clears the priority append indicator bit.
     65 */
     66#define SCHEDULER_PRIORITY_PURIFY( priority )  \
     67  ( ( priority ) & ~( (Priority_Control) SCHEDULER_PRIORITY_APPEND_FLAG ) )
     68
     69/**
     70 * @brief Returns the priority control with the append indicator bit set.
     71 */
     72#define SCHEDULER_PRIORITY_APPEND( priority )  \
     73  ( ( priority ) | SCHEDULER_PRIORITY_APPEND_FLAG )
     74
     75/**
     76 * @brief Returns true, if the item should be appended to its priority group,
     77 * otherwise returns false and the item should be prepended to its priority
     78 * group.
     79 */
     80#define SCHEDULER_PRIORITY_IS_APPEND( priority ) \
     81  ( ( ( priority ) & SCHEDULER_PRIORITY_APPEND_FLAG ) != 0 )
    5282
    5383/**
Note: See TracChangeset for help on using the changeset viewer.