summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/ratemontimeout.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-10-30 17:54:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-10-30 17:54:15 +0000
commitf7c285e6ca81a7b20a01b360a7f26ad4445984a6 (patch)
tree9191ad9cd41ef2b4bcda20fad2d45820b4b5ce9e /cpukit/rtems/src/ratemontimeout.c
parent2009-10-20 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-f7c285e6ca81a7b20a01b360a7f26ad4445984a6.tar.bz2
2009-10-30 Glenn Humphrey <glenn.humphrey@oarcorp.com>
PR pr1462/cpukit * rtems/include/rtems/rtems/ratemon.h, rtems/src/ratemonperiod.c, rtems/src/ratemontimeout.c: Fix bugs in rate monotonic statistics.
Diffstat (limited to 'cpukit/rtems/src/ratemontimeout.c')
-rw-r--r--cpukit/rtems/src/ratemontimeout.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpukit/rtems/src/ratemontimeout.c b/cpukit/rtems/src/ratemontimeout.c
index 2e91fd2803..de1674636c 100644
--- a/cpukit/rtems/src/ratemontimeout.c
+++ b/cpukit/rtems/src/ratemontimeout.c
@@ -1,7 +1,7 @@
/*
* Rate Monotonic Manager -- Period End Timeout Handler
*
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -51,7 +51,6 @@ void _Rate_monotonic_Timeout(
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
-
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
@@ -61,10 +60,14 @@ void _Rate_monotonic_Timeout(
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
+ _Rate_monotonic_Initiate_statistics( the_period );
+
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
+ _Rate_monotonic_Initiate_statistics( the_period );
+
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;