diff options
author | Kuan-Hsun Chen <c0066c@gmail.com> | 2016-12-21 17:42:39 +0100 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2017-01-13 13:55:13 -0500 |
commit | 3a46b72455721c223ad1501c209a9e414d409f7a (patch) | |
tree | 3c5eb108d65ec14ffcc93063627bad2ec4b97fdc /cpukit/rtems/include/rtems/rtems/ratemon.h | |
parent | posix: shared memory support (diff) | |
download | rtems-3a46b72455721c223ad1501c209a9e414d409f7a.tar.bz2 |
Enhancement of the RMS manager for the overrun handling.
Three additional functions:
rtems_rate_monotonic_postponed_job_count,
_Rate_monotonic_Renew_deadline, and _Rate_monotonic_Release_postponed_job.
Four refined functions:
_Rate_monotonic_Activate, _Rate_monotonic_Block_while_expired,
rtems_rate_monotonic_period, _Rate_monotonic_Timeout.
Rate_monotonic_Control contains one counter for counting the postponed jobs
and one for recording the recent deadline.
Update #2795.
Diffstat (limited to '')
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/ratemon.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h index 50b847840f..2eadfc2a7c 100644 --- a/cpukit/rtems/include/rtems/rtems/ratemon.h +++ b/cpukit/rtems/include/rtems/rtems/ratemon.h @@ -18,10 +18,12 @@ * - delete a rate monotonic timer * - conclude current and start the next period * - obtain status information on a period + * - obtain the number of postponed jobs */ /* COPYRIGHT (c) 1989-2009, 2016. * On-Line Applications Research Corporation (OAR). + * COPYRIGHT (c) 2016 Kuan-Hsun Chen. * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -240,6 +242,18 @@ typedef struct { * This field contains the statistics maintained for the period. */ Rate_monotonic_Statistics Statistics; + + /** + * This field contains the number of postponed jobs. + * When the watchdog timeout, this variable will be increased immediately. + */ + uint32_t postponed_jobs; + + /** + * This field contains the tick of the latest deadline decided by the period + * watchdog. + */ + uint64_t latest_deadline; } Rate_monotonic_Control; /** @@ -403,6 +417,25 @@ rtems_status_code rtems_rate_monotonic_period( rtems_interval length ); +/** + * @brief RTEMS Return the number of postponed jobs + * + * This is a helper function for runtime monitoring to return + * the number of postponed jobs in this given period. This number + * is only increased by the corresponding watchdog, + * and is decreased by RMS manager with the postponed job releasing. + * + * @param[in] id is the period id + * + * @retval This helper function returns the number of postponed + * jobs with a given period_id. + * + */ +uint32_t rtems_rate_monotonic_postponed_num( + rtems_id period_id +); + + /**@}*/ #ifdef __cplusplus |