RTEMS: cpukit/include/rtems/rtems/ratemon.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
ratemon.h
Go to the documentation of this file.
1
21/* COPYRIGHT (c) 1989-2009, 2016.
22 * On-Line Applications Research Corporation (OAR).
23 * COPYRIGHT (c) 2016-2017 Kuan-Hsun Chen.
24 *
25 * The license and distribution terms for this file may be
26 * found in the file LICENSE in this distribution or at
27 * http://www.rtems.org/license/LICENSE.
28 */
29
30#ifndef _RTEMS_RTEMS_RATEMON_H
31#define _RTEMS_RTEMS_RATEMON_H
32
33#include <rtems/rtems/types.h>
34#include <rtems/rtems/status.h>
35
36struct rtems_printer;
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
58typedef struct timespec rtems_rate_monotonic_period_time_t RTEMS_DEPRECATED;
59
64 typedef enum {
69 RATE_MONOTONIC_INACTIVE,
70
76 RATE_MONOTONIC_ACTIVE,
77
83 RATE_MONOTONIC_EXPIRED
84} rtems_rate_monotonic_period_states;
85
90#define RTEMS_PERIOD_STATUS WATCHDOG_NO_TIMEOUT
91
99 typedef struct {
101 uint32_t count;
103 uint32_t missed_count;
104
106 struct timespec min_cpu_time;
108 struct timespec max_cpu_time;
110 struct timespec total_cpu_time;
111
113 struct timespec min_wall_time;
115 struct timespec max_wall_time;
117 struct timespec total_wall_time;
118} rtems_rate_monotonic_period_statistics;
119
123 typedef struct {
125 rtems_id owner;
126
128 rtems_rate_monotonic_period_states state;
129
135 struct timespec since_last_period;
136
142 struct timespec executed_since_last_period;
143
145 uint32_t postponed_jobs_count;
146} rtems_rate_monotonic_period_status;
147
157 rtems_status_code rtems_rate_monotonic_create(
158 rtems_name name,
159 rtems_id *id
160);
161
177 rtems_status_code rtems_rate_monotonic_ident(
178 rtems_name name,
179 rtems_id *id
180);
181
195 rtems_status_code rtems_rate_monotonic_cancel(
196 rtems_id id
197);
198
211 rtems_status_code rtems_rate_monotonic_delete(
212 rtems_id id
213);
214
229 rtems_status_code rtems_rate_monotonic_get_status(
230 rtems_id id,
231 rtems_rate_monotonic_period_status *status
232);
233
245 rtems_status_code rtems_rate_monotonic_get_statistics(
246 rtems_id id,
247 rtems_rate_monotonic_period_statistics *statistics
248);
249
258 rtems_status_code rtems_rate_monotonic_reset_statistics(
259 rtems_id id
260);
261
268void rtems_rate_monotonic_reset_all_statistics( void );
269
279 void rtems_rate_monotonic_report_statistics_with_plugin(
280 const struct rtems_printer *printer
281);
282
289void rtems_rate_monotonic_report_statistics( void );
290
304 rtems_status_code rtems_rate_monotonic_period(
305 rtems_id id,
306 rtems_interval length
307);
308
311#ifdef __cplusplus
312}
313#endif
314
315#endif
316/* end of include file */
types.h
rtems_rate_monotonic_report_statistics_with_plugin
void rtems_rate_monotonic_report_statistics_with_plugin(const struct rtems_printer *printer)
RTEMS Report Rate Monotonic Statistics.
rtems_rate_monotonic_period_states
rtems_rate_monotonic_period_states
Definition: ratemon.h:64
rtems_rate_monotonic_cancel
rtems_status_code rtems_rate_monotonic_cancel(rtems_id id)
RTEMS Rate Monotonic Cancel.
Definition: ratemoncancel.c:49
rtems_rate_monotonic_period
rtems_status_code rtems_rate_monotonic_period(rtems_id id, rtems_interval length)
RTEMS Rate Monotonic Period.
Definition: ratemonperiod.c:305
rtems_rate_monotonic_delete
rtems_status_code rtems_rate_monotonic_delete(rtems_id id)
RTEMS Delete Rate Monotonic.
Definition: ratemondelete.c:24
rtems_rate_monotonic_report_statistics
void rtems_rate_monotonic_report_statistics(void)
RTEMS Report Rate Monotonic Statistics.
Definition: ratemonreportstatistics.c:157
rtems_rate_monotonic_get_statistics
rtems_status_code rtems_rate_monotonic_get_statistics(rtems_id id, rtems_rate_monotonic_period_statistics *statistics)
RTEMS Rate Monotonic Get Statistics.
Definition: ratemongetstatistics.c:24
rtems_rate_monotonic_get_status
rtems_status_code rtems_rate_monotonic_get_status(rtems_id id, rtems_rate_monotonic_period_status *status)
RTEMS Rate Monotonic Get Status.
Definition: ratemongetstatus.c:25
rtems_rate_monotonic_ident
rtems_status_code rtems_rate_monotonic_ident(rtems_name name, rtems_id *id)
RTEMS Rate Monotonic Name to Id.
Definition: ratemonident.c:27
rtems_rate_monotonic_create
rtems_status_code rtems_rate_monotonic_create(rtems_name name, rtems_id *id)
Create a Period.
Definition: ratemoncreate.c:30
rtems_rate_monotonic_reset_all_statistics
void rtems_rate_monotonic_reset_all_statistics(void)
rtems_rate_monotonic_reset_all_statistics
Definition: ratemonresetall.c:27
rtems_rate_monotonic_reset_statistics
rtems_status_code rtems_rate_monotonic_reset_statistics(rtems_id id)
RTEMS Rate Monotonic Reset Statistics.
Definition: ratemonresetstatistics.c:24
RATE_MONOTONIC_ACTIVE
@ RATE_MONOTONIC_ACTIVE
Definition: ratemon.h:76
RATE_MONOTONIC_EXPIRED
@ RATE_MONOTONIC_EXPIRED
Definition: ratemon.h:83
RATE_MONOTONIC_INACTIVE
@ RATE_MONOTONIC_INACTIVE
Definition: ratemon.h:69
rtems_status_code
rtems_status_code
Classic API Status.
Definition: status.h:43
rtems_name
uint32_t rtems_name
Classic API object name type.
Definition: types.h:77
rtems_id
Objects_Id rtems_id
Used to manage and manipulate RTEMS object identifiers.
Definition: types.h:83
rtems_interval
Watchdog_Interval rtems_interval
Used to manage and manipulate intervals specified by clock ticks.
Definition: types.h:127
status.h
rtems_printer
Definition: printer.h:55
rtems_rate_monotonic_period_statistics
Definition: ratemon.h:99
rtems_rate_monotonic_period_statistics::missed_count
uint32_t missed_count
Definition: ratemon.h:103
rtems_rate_monotonic_period_statistics::count
uint32_t count
Definition: ratemon.h:101
rtems_rate_monotonic_period_status
Definition: ratemon.h:123
rtems_rate_monotonic_period_status::postponed_jobs_count
uint32_t postponed_jobs_count
Definition: ratemon.h:145
rtems_rate_monotonic_period_status::state
rtems_rate_monotonic_period_states state
Definition: ratemon.h:128
rtems_rate_monotonic_period_status::owner
rtems_id owner
Definition: ratemon.h:125