Changeset 7ee4e72 in rtems


Ignore:
Timestamp:
Feb 20, 2014, 4:05:44 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
47d60134
Parents:
83bf105
git-author:
Sebastian Huber <sebastian.huber@…> (02/20/14 16:05:44)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/21/14 08:38:25)
Message:

score: _Thread_Start_multitasking()

Fix serious race-condition. Read the heir after the per-CPU lock
acquire.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/threadstartmultitasking.c

    r83bf105 r7ee4e72  
    2424{
    2525  Per_CPU_Control *self_cpu = _Per_CPU_Get();
    26   Thread_Control  *heir = self_cpu->heir;
     26  Thread_Control  *heir;
    2727
    2828#if defined(RTEMS_SMP)
     
    3636  _Per_CPU_Acquire( self_cpu );
    3737  self_cpu->thread_dispatch_disable_level = 1;
     38#endif
    3839
     40  heir = self_cpu->heir;
     41
     42#if defined(RTEMS_SMP)
    3943  self_cpu->executing->is_executing = false;
    4044  heir->is_executing = true;
Note: See TracChangeset for help on using the changeset viewer.