mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 18:10:52 +08:00
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.
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user