Changeset d063e7b3 in rtems


Ignore:
Timestamp:
Jan 11, 2017, 7:42:04 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
fa9f964f
Parents:
48a7fa3
git-author:
Sebastian Huber <sebastian.huber@…> (01/11/17 07:42:04)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/12/17 06:44:36)
Message:

score: Replace STATES_DELAYING

Replace STATES_DELAYING with STATES_WAITING_FOR_TIME.

There is no need for separate timeout thread states. The
Thread_Control::Timer::header and Watchdog_Control::cpu members can be
used to figure out the kind of timeout.

Location:
cpukit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdebugger/rtems-debugger-threads.c

    r48a7fa3 rd063e7b3  
    515515  };
    516516  const struct mapper map[] = {
    517     { "DELAY",  STATES_DELAYING },
    518517    { "DORM",   STATES_DORMANT },
    519518    { "LIFE",   STATES_LIFE_IS_CHANGING },
  • cpukit/libmisc/monitor/mon-prmisc.c

    r48a7fa3 rd063e7b3  
    116116
    117117static const rtems_assoc_t rtems_monitor_state_assoc[] = {
    118     { "DELAY",  STATES_DELAYING, 0 },
    119118    { "DORM",   STATES_DORMANT, 0 },
    120119    { "LIFE",   STATES_LIFE_IS_CHANGING, 0 },
  • cpukit/posix/src/nanosleep.c

    r48a7fa3 rd063e7b3  
    5050  _Thread_queue_Context_set_thread_state(
    5151    &queue_context,
    52     STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
     52    STATES_WAITING_FOR_TIME | STATES_INTERRUPTIBLE_BY_SIGNAL
    5353  );
    5454  _Thread_queue_Context_set_enqueue_callout(
  • cpukit/rtems/src/taskwakeafter.c

    r48a7fa3 rd063e7b3  
    4040      _Thread_Yield( executing );
    4141    } else {
    42       _Thread_Set_state( executing, STATES_DELAYING );
     42      _Thread_Set_state( executing, STATES_WAITING_FOR_TIME );
    4343      _Thread_Wait_flags_set( executing, THREAD_WAIT_STATE_BLOCKED );
    4444      _Thread_Timer_insert_relative(
  • cpukit/score/include/rtems/score/statesimpl.h

    r48a7fa3 rd063e7b3  
    7575#define STATES_WAITING_FOR_BSD_WAKEUP          0x00000100
    7676
    77 /** This macro corresponds to a task which is waiting for a timeout. */
    78 #define STATES_DELAYING                        0x00000200
     77/**
     78 * @brief This macro corresponds to a task which is waiting for a relative or
     79 * absolute timeout.
     80 */
     81#define STATES_WAITING_FOR_TIME                0x00000200
    7982
    8083/** This macro corresponds to a task waiting for a period. */
     
    104107/** This macro corresponds to a task those life is changing. */
    105108#define STATES_LIFE_IS_CHANGING                0x00040000
    106 
    107 /** This macro corresponds to a task waiting until a specific TOD. */
    108 #define STATES_WAITING_FOR_TIME                0x00080000
    109109
    110110/** This macro corresponds to a task being held by the debugger. */
     
    140140
    141141/** This macro corresponds to a task waiting which is blocked. */
    142 #define STATES_BLOCKED         ( STATES_DELAYING                | \
    143                                  STATES_LOCALLY_BLOCKED         | \
     142#define STATES_BLOCKED         ( STATES_LOCALLY_BLOCKED         | \
    144143                                 STATES_WAITING_FOR_TIME        | \
    145144                                 STATES_WAITING_FOR_PERIOD      | \
     
    247246
    248247/**
    249  * This function returns true if the DELAYING state is set in
    250  * the_states, and false otherwise.
    251  *
    252  * @param[in] the_states is the task state set to test
    253  *
    254  * @return This method returns true if the desired state condition is set.
    255  */
    256 RTEMS_INLINE_ROUTINE bool _States_Is_delaying (
    257   States_Control the_states
    258 )
    259 {
    260    return (the_states & STATES_DELAYING);
    261 }
    262 
    263 /**
    264248 * This function returns true if the WAITING_FOR_SEGMENT state is set in
    265249 * the_states, and false otherwise.
     
    349333{
    350334   return (the_states & STATES_WAITING_FOR_SEMAPHORE);
    351 }
    352 
    353 /**
    354  * This function returns true if the WAITING_FOR_TIME state is set in
    355  * the_states, and false otherwise.
    356  *
    357  * @param[in] the_states is the task state set to test
    358  *
    359  * @return This method returns true if the desired state condition is set.
    360  */
    361 RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_time (
    362   States_Control the_states
    363 )
    364 {
    365    return (the_states & STATES_WAITING_FOR_TIME);
    366335}
    367336
Note: See TracChangeset for help on using the changeset viewer.