Ignore:
Timestamp:
Jun 10, 2013, 2:15:46 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
a344308
Parents:
1ccb64e1
git-author:
Sebastian Huber <sebastian.huber@…> (06/10/13 14:15:46)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/14/13 14:26:08)
Message:

scheduler: Specify thread of yield operation

The yielding thread of the yield operation is now specified by a
parameter. The tick operation may be performed for each executing
thread in a SMP configuration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/taskwakeafter.c

    r1ccb64e1 r6eba7c85  
    3939)
    4040{
     41  /*
     42   * It is critical to obtain the executing thread after thread dispatching is
     43   * disabled on SMP configurations.
     44   */
     45  Thread_Control *executing;
     46
    4147  _Thread_Disable_dispatch();
     48    executing = _Thread_Executing;
     49
    4250    if ( ticks == 0 ) {
    43       _Scheduler_Yield();
     51      _Scheduler_Yield( executing );
    4452    } else {
    45       _Thread_Set_state( _Thread_Executing, STATES_DELAYING );
     53      _Thread_Set_state( executing, STATES_DELAYING );
    4654      _Watchdog_Initialize(
    47         &_Thread_Executing->Timer,
     55        &executing->Timer,
    4856        _Thread_Delay_ended,
    49         _Thread_Executing->Object.id,
     57        executing->Object.id,
    5058        NULL
    5159      );
    52       _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
     60      _Watchdog_Insert_ticks( &executing->Timer, ticks );
    5361    }
    5462  _Thread_Enable_dispatch();
Note: See TracChangeset for help on using the changeset viewer.