Changeset edbd43c6 in rtems


Ignore:
Timestamp:
11/04/16 12:19:11 (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
df48ed2
Parents:
df63fbd1
git-author:
Sebastian Huber <sebastian.huber@…> (11/04/16 12:19:11)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/07/16 06:39:41)
Message:

score: Prevent assignment to _Thread_Executing

Files:
3 edited

Legend:

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

    rdf63fbd1 redbd43c6  
    683683  _Per_CPU_Get()->heir
    684684#define _Thread_Executing \
    685   _Per_CPU_Get()->executing
     685  _Per_CPU_Get_executing( _Per_CPU_Get() )
    686686#define _ISR_Nest_level \
    687687  _Per_CPU_Get()->isr_nest_level
  • testsuites/tmtests/tm26/task1.c

    rdf63fbd1 redbd43c6  
    124124static void set_thread_executing( Thread_Control *thread )
    125125{
    126 #if defined( PREVENT_SMP_ASSERT_FAILURES )
    127   ISR_Level level;
    128 
    129   _ISR_Local_disable( level );
    130 #endif
    131 
    132   _Thread_Executing = thread;
    133 
    134 #if defined( PREVENT_SMP_ASSERT_FAILURES )
    135   _ISR_Local_enable( level );
    136 #endif
     126  _Per_CPU_Get_snapshot()->executing = thread;
    137127}
    138128
  • testsuites/tmtests/tm27/task1.c

    rdf63fbd1 redbd43c6  
    4646  rtems_vector_number vector
    4747);
     48
     49static void set_thread_executing( Thread_Control *thread )
     50{
     51  _Per_CPU_Get_snapshot()->executing = thread;
     52}
    4853
    4954rtems_task Init(
     
    192197#endif
    193198
    194   _Thread_Executing =
    195         (Thread_Control *) _Chain_First(&scheduler_context->Ready[LOW_PRIORITY]);
     199  set_thread_executing(
     200    (Thread_Control *) _Chain_First(&scheduler_context->Ready[LOW_PRIORITY])
     201  );
    196202
    197203  _Thread_Dispatch_necessary = 1;
     
    266272  _Scheduler_Acquire_critical( scheduler, &scheduler_lock_context );
    267273
    268   _Thread_Executing =
    269         (Thread_Control *) _Chain_First(&scheduler_context->Ready[LOW_PRIORITY]);
     274  set_thread_executing(
     275    (Thread_Control *) _Chain_First(&scheduler_context->Ready[LOW_PRIORITY])
     276  );
    270277
    271278  _Thread_Dispatch_necessary = 1;
Note: See TracChangeset for help on using the changeset viewer.