diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-29 17:25:50 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-01 16:45:44 +0200 |
commit | 1e51fa5f4de9f15a99e3cb1fd1787f1861304e7e (patch) | |
tree | 2704821edf18abd2392e7e9ceeae4ad196487a20 /cpukit/score/src/threaddispatch.c | |
parent | tmtests/tm27: Fixes for RTEMS_DEBUG (diff) | |
download | rtems-1e51fa5f4de9f15a99e3cb1fd1787f1861304e7e.tar.bz2 |
score: Add and use _Thread_Update_cpu_time_used()
Fix _times().
Diffstat (limited to 'cpukit/score/src/threaddispatch.c')
-rw-r--r-- | cpukit/score/src/threaddispatch.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c index c5d0a2199b..09b5dbe105 100644 --- a/cpukit/score/src/threaddispatch.c +++ b/cpukit/score/src/threaddispatch.c @@ -105,17 +105,10 @@ void _Thread_Dispatch( void ) _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ - { - Timestamp_Control uptime, ran; - _TOD_Get_uptime( &uptime ); - _Timestamp_Subtract( - &_Thread_Time_of_last_context_switch, - &uptime, - &ran - ); - _Timestamp_Add_to( &executing->cpu_time_used, &ran ); - _Thread_Time_of_last_context_switch = uptime; - } + _Thread_Update_cpu_time_used( + executing, + &_Thread_Time_of_last_context_switch + ); #else { _TOD_Get_uptime( &_Thread_Time_of_last_context_switch ); |