Changeset 0a101d57 in rtems


Ignore:
Timestamp:
May 12, 2011, 1:23:12 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
68c6900d
Parents:
40255cb9
Message:

2011-05-12 Joel Sherrill <joel.sherrill@…>

PR 1788/cpukit

  • score/include/rtems/score/percpu.h, score/include/rtems/score/thread.h: Make time of last context switch part of per cpu information since each core has a different context switch to track.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r40255cb9 r0a101d57  
     12011-05-12      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        PR 1788/cpukit
     4        * score/include/rtems/score/percpu.h,
     5        score/include/rtems/score/thread.h: Make time of last context switch
     6        part of per cpu information since each core has a different context
     7        switch to track.
     8
    192011-05-12      Ralf Corsépius <ralf.corsepius@rtems.org>
    210
  • cpukit/score/include/rtems/score/percpu.h

    r40255cb9 r0a101d57  
    2525  #include <rtems/asm.h>
    2626#else
     27  #include <rtems/score/timestamp.h>
    2728  #if defined(RTEMS_SMP)
    2829    #include <rtems/score/smplock.h>
     
    5253
    5354#ifndef ASM
     55#include <rtems/score/timestamp.h>
     56
    5457#ifndef __THREAD_CONTROL_DEFINED__
    5558#define __THREAD_CONTROL_DEFINED__
     
    137140  volatile bool dispatch_necessary;
    138141
     142  /** This is the time of the last context switch on this CPU. */
     143  Timestamp_Control time_of_last_context_switch;
    139144} Per_CPU_Control;
    140145#endif
     
    250255#define _Thread_Dispatch_necessary \
    251256  _Per_CPU_Information[bsp_smp_processor_id()].dispatch_necessary
     257#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
     258  #define _Thread_Time_of_last_context_switch \
     259    _Per_CPU_Information[bsp_smp_processor_id()].time_of_last_context_switch
     260#endif
     261
    252262
    253263#endif  /* ASM */
  • cpukit/score/include/rtems/score/thread.h

    r40255cb9 r0a101d57  
    493493SCORE_EXTERN struct _reent **_Thread_libc_reent;
    494494
    495 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
    496 
    497   /**
    498    * This contains the time since boot when the last context switch occurred.
    499    * By placing it in the BSS, it will automatically be zeroed out at
    500    * system initialization and does not need to be known outside this
    501    * file.
    502    */
    503   SCORE_EXTERN Timestamp_Control _Thread_Time_of_last_context_switch;
    504 #endif
    505495
    506496/**
Note: See TracChangeset for help on using the changeset viewer.