forked from Imagelibrary/rtems
2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1348/cpukit * rtems/src/ratemonperiod.c: Properly handle period statistics after cpu usage information is reset while a period is running.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2008-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
PR 1348/cpukit
|
||||||
|
* rtems/src/ratemonperiod.c: Properly handle period statistics after
|
||||||
|
cpu usage information is reset while a period is running.
|
||||||
|
|
||||||
2008-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2008-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
PR 1347/cpukit
|
PR 1347/cpukit
|
||||||
|
|||||||
@@ -74,6 +74,10 @@ void _Rate_monotonic_Update_statistics(
|
|||||||
/* Grab CPU usage when the thread got switched in */
|
/* Grab CPU usage when the thread got switched in */
|
||||||
used = _Thread_Executing->cpu_time_used;
|
used = _Thread_Executing->cpu_time_used;
|
||||||
|
|
||||||
|
/* partial period, cpu usage info reset while executing. Throw away */
|
||||||
|
if (_Timespec_Less_than( &used, &the_period->owner_executed_at_period))
|
||||||
|
return;
|
||||||
|
|
||||||
/* How much time time since last context switch */
|
/* How much time time since last context switch */
|
||||||
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
|
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user