summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-09 15:03:29 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-09 15:05:51 +0200
commit82a61afd8ccd695a5517451a0c8f9c4c2f9e373a (patch)
treeecaf016fa2419bc245c2ff791888c5465779c034 /cpukit/rtems/src
parentrtems: Document time of day constraints (diff)
downloadrtems-82a61afd8ccd695a5517451a0c8f9c4c2f9e373a.tar.bz2
rtems: Initialize count of postponed jobs
The rtems_rate_monotonic_get_status() directive returns an arbitrary number for the count of postponed jobs if it is called for a newly created period object. Set the count of postponed jobs to zero during object creation. Close #4511.
Diffstat (limited to 'cpukit/rtems/src')
-rw-r--r--cpukit/rtems/src/ratemoncreate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cpukit/rtems/src/ratemoncreate.c b/cpukit/rtems/src/ratemoncreate.c
index cd56a13df6..1376e51608 100644
--- a/cpukit/rtems/src/ratemoncreate.c
+++ b/cpukit/rtems/src/ratemoncreate.c
@@ -54,6 +54,7 @@ rtems_status_code rtems_rate_monotonic_create(
the_period->owner = _Thread_Get_executing();
the_period->state = RATE_MONOTONIC_INACTIVE;
+ the_period->postponed_jobs = 0;
_Watchdog_Preinitialize( &the_period->Timer, _Per_CPU_Get_by_index( 0 ) );
_Watchdog_Initialize( &the_period->Timer, _Rate_monotonic_Timeout );