Changeset 4e07d9b3 in rtems


Ignore:
Timestamp:
01/05/17 14:40:57 (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
3d35bc0
Parents:
9a448aab
git-author:
Sebastian Huber <sebastian.huber@…> (01/05/17 14:40:57)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/11/17 07:16:28)
Message:

score: Optimize thread state values

File:
1 edited

Legend:

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

    r9a448aab r4e07d9b3  
    3434/*
    3535 *  The following constants define the individual states which may be
    36  *  be used to compose and manipulate a thread's state.
     36 *  be used to compose and manipulate a thread's state.  More frequently used
     37 *  states should use lower value bits to ease the use of immediate values on
     38 *  RISC architectures.
    3739 */
    3840
    3941/** This macro corresponds to a task being ready. */
    4042#define STATES_READY                           0x00000000
    41 /** This macro corresponds to a task being created but not yet started. */
    42 #define STATES_DORMANT                         0x00000001
     43
     44/**
     45 * @brief This macro corresponds to a task which is blocked on a thread queue
     46 * embedded in an object with an identifier.
     47 *
     48 * This thread state bit is intended to ease debugging and improve system
     49 * diagnostics, see _Thread_Wait_get_id().
     50 */
     51#define STATES_THREAD_QUEUE_WITH_IDENTIFIER    0x00000001
     52
     53/** This macro corresponds to a task waiting for a mutex. */
     54#define STATES_WAITING_FOR_MUTEX               0x00000002
     55
     56/** This macro corresponds to a task waiting for a semaphore. */
     57#define STATES_WAITING_FOR_SEMAPHORE           0x00000004
     58
     59/** This macro corresponds to a task waiting for an event. */
     60#define STATES_WAITING_FOR_EVENT               0x00000008
     61
     62/** This macro corresponds to a task waiting for a system event. */
     63#define STATES_WAITING_FOR_SYSTEM_EVENT        0x00000010
     64
     65/** This macro corresponds to a task waiting for a message. */
     66#define STATES_WAITING_FOR_MESSAGE             0x00000020
     67
     68/** This macro corresponds to a task waiting for a condition variable. */
     69#define STATES_WAITING_FOR_CONDITION_VARIABLE  0x00000040
     70
     71/** This macro corresponds to a task waiting for a futex. */
     72#define STATES_WAITING_FOR_FUTEX               0x00000080
     73
     74/** This macro corresponds to a task waiting for BSD wakeup. */
     75#define STATES_WAITING_FOR_BSD_WAKEUP          0x00000100
     76
     77/** This macro corresponds to a task which is waiting for a timeout. */
     78#define STATES_DELAYING                        0x00000200
     79
     80/** This macro corresponds to a task waiting for a period. */
     81#define STATES_WAITING_FOR_PERIOD              0x00000400
     82
     83/** This macro corresponds to a task waiting for a signal. */
     84#define STATES_WAITING_FOR_SIGNAL              0x00000800
     85
     86/** This macro corresponds to a task waiting for a barrier. */
     87#define STATES_WAITING_FOR_BARRIER             0x00001000
     88
     89/** This macro corresponds to a task waiting for a RWLock. */
     90#define STATES_WAITING_FOR_RWLOCK              0x00002000
     91
     92/** This macro corresponds to a task waiting for a join while exiting. */
     93#define STATES_WAITING_FOR_JOIN_AT_EXIT        0x00004000
     94
     95/** This macro corresponds to a task waiting for a join. */
     96#define STATES_WAITING_FOR_JOIN                0x00008000
     97
    4398/** This macro corresponds to a task being suspended. */
    44 #define STATES_SUSPENDED                       0x00000002
    45 /** This macro corresponds to a task which is waiting for a timeout. */
    46 #define STATES_DELAYING                        0x00000008
     99#define STATES_SUSPENDED                       0x00010000
     100
     101/** This macro corresponds to a task waiting for a fixed size segment. */
     102#define STATES_WAITING_FOR_SEGMENT             0x00020000
     103
     104/** This macro corresponds to a task those life is changing. */
     105#define STATES_LIFE_IS_CHANGING                0x00040000
     106
    47107/** This macro corresponds to a task waiting until a specific TOD. */
    48 #define STATES_WAITING_FOR_TIME                0x00000010
    49 /** This macro corresponds to a task waiting for a fixed size segment. */
    50 #define STATES_WAITING_FOR_SEGMENT             0x00000040
    51 /** This macro corresponds to a task waiting for a message. */
    52 #define STATES_WAITING_FOR_MESSAGE             0x00000080
    53 /** This macro corresponds to a task waiting for an event. */
    54 #define STATES_WAITING_FOR_EVENT               0x00000100
    55 /** This macro corresponds to a task waiting for a semaphore. */
    56 #define STATES_WAITING_FOR_SEMAPHORE           0x00000200
    57 /** This macro corresponds to a task waiting for a mutex. */
    58 #define STATES_WAITING_FOR_MUTEX               0x00000400
    59 /** This macro corresponds to a task waiting for a condition variable. */
    60 #define STATES_WAITING_FOR_CONDITION_VARIABLE  0x00000800
    61 /** This macro corresponds to a task waiting for a join while exiting. */
    62 #define STATES_WAITING_FOR_JOIN_AT_EXIT        0x00001000
    63 /** This macro corresponds to a task waiting for a reply to an MPCI request. */
    64 #define STATES_WAITING_FOR_RPC_REPLY           0x00002000
    65 /** This macro corresponds to a task waiting for a period. */
    66 #define STATES_WAITING_FOR_PERIOD              0x00004000
    67 /** This macro corresponds to a task waiting for a signal. */
    68 #define STATES_WAITING_FOR_SIGNAL              0x00008000
    69 /** This macro corresponds to a task waiting for a barrier. */
    70 #define STATES_WAITING_FOR_BARRIER             0x00010000
    71 /** This macro corresponds to a task waiting for a RWLock. */
    72 #define STATES_WAITING_FOR_RWLOCK              0x00020000
    73 /** This macro corresponds to a task waiting for a system event. */
    74 #define STATES_WAITING_FOR_SYSTEM_EVENT        0x00040000
    75 /** This macro corresponds to a task waiting for BSD wakeup. */
    76 #define STATES_WAITING_FOR_BSD_WAKEUP          0x00080000
     108#define STATES_WAITING_FOR_TIME                0x00080000
     109
    77110/** This macro corresponds to a task being held by the debugger. */
    78 #define STATES_DEBUGGER                        0x00100000
    79 /** This macro corresponds to a task being a zombie. */
    80 #define STATES_ZOMBIE                          0x00200000
    81 /** This macro corresponds to a task those life is changing. */
    82 #define STATES_LIFE_IS_CHANGING                0x00800000
    83 /** This macro corresponds to a task waiting for a join. */
    84 #define STATES_WAITING_FOR_JOIN                0x01000000
    85 /** This macro corresponds to a task waiting for a futex. */
    86 #define STATES_WAITING_FOR_FUTEX               0x08000000
     111#define STATES_DEBUGGER                        0x08000000
    87112
    88113/** This macro corresponds to a task which is in an interruptible
     
    91116#define STATES_INTERRUPTIBLE_BY_SIGNAL         0x10000000
    92117
    93 /**
    94  * @brief This macro corresponds to a task which is blocked on a thread queue
    95  * embedded in an object with an identifier.
    96  *
    97  * This thread state bit is intended to ease debugging and improve system
    98  * diagnostics, see _Thread_Wait_get_id().
    99  */
    100 #define STATES_THREAD_QUEUE_WITH_IDENTIFIER    0x80000000
     118/** This macro corresponds to a task waiting for a reply to an MPCI request. */
     119#define STATES_WAITING_FOR_RPC_REPLY           0x20000000
     120
     121/** This macro corresponds to a task being a zombie. */
     122#define STATES_ZOMBIE                          0x40000000
     123
     124/** This macro corresponds to a task being created but not yet started. */
     125#define STATES_DORMANT                         0x80000000
    101126
    102127/** This macro corresponds to a task waiting for a local object operation. */
Note: See TracChangeset for help on using the changeset viewer.