Changeset 26333f2a in rtems for cpukit


Ignore:
Timestamp:
Feb 8, 2019, 9:16:07 AM (4 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
568490a
Parents:
4e686261
git-author:
Sebastian Huber <sebastian.huber@…> (02/08/19 09:16:07)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/08/19 09:17:26)
Message:

score: Fix _User_extensions_Thread_switch() (SMP)

We have to read the first node again once we obtained the lock since it
may have aready changed.

File:
1 edited

Legend:

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

    r4e686261 r26333f2a  
    257257)
    258258{
    259   const Chain_Control *chain = &_User_extensions_Switches_list;
    260   const Chain_Node    *tail = _Chain_Immutable_tail( chain );
    261   const Chain_Node    *node = _Chain_Immutable_first( chain );
     259  const Chain_Control *chain;
     260  const Chain_Node    *tail;
     261  const Chain_Node    *node;
     262
     263  chain = &_User_extensions_Switches_list;
     264  tail = _Chain_Immutable_tail( chain );
     265  node = _Chain_Immutable_first( chain );
    262266
    263267  if ( node != tail ) {
     
    274278    _Per_CPU_Acquire( cpu_self );
    275279
     280#if defined(RTEMS_SMP)
     281    node = _Chain_Immutable_first( chain );
     282#endif
     283
    276284    while ( node != tail ) {
    277285      const User_extensions_Switch_control *extension =
Note: See TracChangeset for help on using the changeset viewer.