[PATCH] rtems: Fix rate monotonic statistics

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Oct 19 14:49:58 UTC 2021


On 12/10/2021 08:44, Sebastian Huber wrote:
> On 12/10/2021 08:36, Sebastian Huber wrote:
>> diff --git a/cpukit/libcsupport/src/__times.c 
>> b/cpukit/libcsupport/src/__times.c
>> index 7bb7e0e9ca..a37c662654 100644
>> --- a/cpukit/libcsupport/src/__times.c
>> +++ b/cpukit/libcsupport/src/__times.c
>> @@ -65,7 +65,8 @@ clock_t _times(
>>      *  of ticks since boot and the number of ticks executed by this
>>      *  this thread.
>>      */
>> -  _Thread_Get_CPU_time_used( _Thread_Get_executing(), &cpu_time_used );
>> +  cpu_time_used =
>> +    _Thread_Get_CPU_time_used_after_last_reset( 
>> _Thread_Get_executing() );
>>     ptms->tms_utime = ((clock_t) cpu_time_used) / tick_interval;
>>     return ptms->tms_stime;
> 
> Should the tms_utime be affected by rtems_cpu_useage_report()?

Any comments with respect to this patch?

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list