RTEMS
cpukit
rtems
src
ratemongetstatistics.c
Go to the documentation of this file.
1
8
/*
9
* COPYRIGHT (c) 1989-2009.
10
* On-Line Applications Research Corporation (OAR).
11
* Copyright (c) 2016 embedded brains GmbH.
12
*
13
* The license and distribution terms for this file may be
14
* found in the file LICENSE in this distribution or at
15
* http://www.rtems.org/license/LICENSE.
16
*/
17
18
#ifdef HAVE_CONFIG_H
19
#include "config.h"
20
#endif
21
22
#include <
rtems/rtems/ratemonimpl.h
>
23
24
rtems_status_code
rtems_rate_monotonic_get_statistics
(
25
rtems_id
id
,
26
rtems_rate_monotonic_period_statistics
*dst
27
)
28
{
29
Rate_monotonic_Control
*the_period;
30
ISR_lock_Context
lock_context;
31
const
Rate_monotonic_Statistics
*src;
32
33
if
( dst == NULL ) {
34
return
RTEMS_INVALID_ADDRESS
;
35
}
36
37
the_period = _Rate_monotonic_Get(
id
, &lock_context );
38
if
( the_period == NULL ) {
39
return
RTEMS_INVALID_ID
;
40
}
41
42
_Rate_monotonic_Acquire_critical( the_period, &lock_context );
43
44
src = &the_period->
Statistics
;
45
dst->
count
= src->
count
;
46
dst->
missed_count
= src->
missed_count
;
47
_Timestamp_To_timespec
( &src->
min_cpu_time
, &dst->
min_cpu_time
);
48
_Timestamp_To_timespec
( &src->
max_cpu_time
, &dst->
max_cpu_time
);
49
_Timestamp_To_timespec
( &src->
total_cpu_time
, &dst->
total_cpu_time
);
50
_Timestamp_To_timespec
( &src->
min_wall_time
, &dst->
min_wall_time
);
51
_Timestamp_To_timespec
( &src->
max_wall_time
, &dst->
max_wall_time
);
52
_Timestamp_To_timespec
( &src->
total_wall_time
, &dst->
total_wall_time
);
53
54
_Rate_monotonic_Release( the_period, &lock_context );
55
return
RTEMS_SUCCESSFUL
;
56
}
Rate_monotonic_Statistics::max_wall_time
Timestamp_Control max_wall_time
Definition:
ratemondata.h:56
Rate_monotonic_Statistics::count
uint32_t count
Definition:
ratemondata.h:42
Rate_monotonic_Statistics::min_cpu_time
Timestamp_Control min_cpu_time
Definition:
ratemondata.h:47
rtems_rate_monotonic_period_statistics::total_cpu_time
struct timespec total_cpu_time
This member is.
Definition:
ratemon.h:145
rtems_rate_monotonic_period_statistics::max_cpu_time
struct timespec max_cpu_time
This member is.
Definition:
ratemon.h:138
rtems_rate_monotonic_get_statistics
rtems_status_code rtems_rate_monotonic_get_statistics(rtems_id id, rtems_rate_monotonic_period_statistics *dst)
%
Definition:
ratemongetstatistics.c:24
RTEMS_SUCCESSFUL
This status code indicates successful completion.
Definition:
status.h:86
Rate_monotonic_Statistics::total_wall_time
Timestamp_Control total_wall_time
Definition:
ratemondata.h:58
Rate_monotonic_Statistics::missed_count
uint32_t missed_count
Definition:
ratemondata.h:44
rtems_status_code
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition:
status.h:82
Rate_monotonic_Statistics
Definition:
ratemondata.h:40
Rate_monotonic_Statistics::min_wall_time
Timestamp_Control min_wall_time
Definition:
ratemondata.h:54
rtems_rate_monotonic_period_statistics::missed_count
uint32_t missed_count
This member is.
Definition:
ratemon.h:124
rtems_rate_monotonic_period_statistics
%
Definition:
ratemon.h:111
rtems_rate_monotonic_period_statistics::count
uint32_t count
This member is.
Definition:
ratemon.h:117
Rate_monotonic_Control::Statistics
Rate_monotonic_Statistics Statistics
Definition:
ratemondata.h:118
Rate_monotonic_Statistics::total_cpu_time
Timestamp_Control total_cpu_time
Definition:
ratemondata.h:51
RTEMS_INVALID_ADDRESS
This status code indicates that a specified address was invalid.
Definition:
status.h:133
Rate_monotonic_Control
The following structure defines the control block used to manage each period.
Definition:
ratemondata.h:69
rtems_rate_monotonic_period_statistics::min_cpu_time
struct timespec min_cpu_time
This member is.
Definition:
ratemon.h:131
RTEMS_INVALID_ID
This status code indicates that an object identifier was invalid.
Definition:
status.h:106
rtems_id
Objects_Id rtems_id
Values of this type identify an RTEMS object.
Definition:
types.h:99
rtems_rate_monotonic_period_statistics::min_wall_time
struct timespec min_wall_time
This member is.
Definition:
ratemon.h:152
_Timestamp_To_timespec
static __inline__ void _Timestamp_To_timespec(const Timestamp_Control *_timestamp, struct timespec *_timespec)
Converts timestamp to struct timespec.
Definition:
timestampimpl.h:269
ratemonimpl.h
Classic Rate Monotonic Scheduler Implementation.
ISR_lock_Context
Local ISR lock context for acquire and release pairs.
Definition:
isrlock.h:65
rtems_rate_monotonic_period_statistics::max_wall_time
struct timespec max_wall_time
This member is.
Definition:
ratemon.h:159
Rate_monotonic_Statistics::max_cpu_time
Timestamp_Control max_cpu_time
Definition:
ratemondata.h:49
rtems_rate_monotonic_period_statistics::total_wall_time
struct timespec total_wall_time
This member is.
Definition:
ratemon.h:166
Generated by
1.8.14