1 | -- |
---|
2 | -- RTEMS / Specification |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package provides the interface to the RTEMS API. |
---|
7 | -- |
---|
8 | -- DEPENDENCIES: |
---|
9 | -- |
---|
10 | -- NOTES: |
---|
11 | -- RTEMS initialization and configuration are called from |
---|
12 | -- the BSP side, therefore should never be called from ADA. |
---|
13 | -- |
---|
14 | -- COPYRIGHT (c) 1997-2011. |
---|
15 | -- On-Line Applications Research Corporation (OAR). |
---|
16 | -- |
---|
17 | -- The license and distribution terms for this file may in |
---|
18 | -- the file LICENSE in this distribution or at |
---|
19 | -- http://www.rtems.org/license/LICENSE. |
---|
20 | -- |
---|
21 | |
---|
22 | package RTEMS.Rate_Monotonic is |
---|
23 | |
---|
24 | -- |
---|
25 | -- The following type defines the status information returned |
---|
26 | -- about a period. |
---|
27 | -- |
---|
28 | |
---|
29 | type Period_States is ( |
---|
30 | Inactive, -- off chain, never initialized |
---|
31 | Owner_Is_Blocking, -- on chain, owner is blocking on it |
---|
32 | Active, -- on chain, running continuously |
---|
33 | Expired_While_Blocking, -- on chain, expired while owner was was blocking |
---|
34 | Expired -- off chain, will be reset by next |
---|
35 | -- rtems_rate_monotonic_period |
---|
36 | ); |
---|
37 | |
---|
38 | for Period_States'Size use 32; |
---|
39 | |
---|
40 | for Period_States use ( |
---|
41 | Inactive => 0, |
---|
42 | Owner_Is_Blocking => 1, |
---|
43 | Active => 2, |
---|
44 | Expired_While_Blocking => 3, |
---|
45 | Expired => 4 |
---|
46 | ); |
---|
47 | |
---|
48 | type Period_Status is |
---|
49 | record |
---|
50 | Owner : RTEMS.ID; |
---|
51 | State : RTEMS.Rate_Monotonic.Period_States; |
---|
52 | Ticks_Since_Last_Period : RTEMS.Unsigned32; |
---|
53 | Ticks_Executed_Since_Last_Period : RTEMS.Unsigned32; |
---|
54 | end record; |
---|
55 | |
---|
56 | -- |
---|
57 | -- Rate Monotonic Manager |
---|
58 | -- |
---|
59 | |
---|
60 | procedure Create ( |
---|
61 | Name : in RTEMS.Name; |
---|
62 | ID : out RTEMS.ID; |
---|
63 | Result : out RTEMS.Status_Codes |
---|
64 | ); |
---|
65 | |
---|
66 | procedure Ident ( |
---|
67 | Name : in RTEMS.Name; |
---|
68 | ID : out RTEMS.ID; |
---|
69 | Result : out RTEMS.Status_Codes |
---|
70 | ); |
---|
71 | |
---|
72 | procedure Delete ( |
---|
73 | ID : in RTEMS.ID; |
---|
74 | Result : out RTEMS.Status_Codes |
---|
75 | ); |
---|
76 | |
---|
77 | procedure Cancel ( |
---|
78 | ID : in RTEMS.ID; |
---|
79 | Result : out RTEMS.Status_Codes |
---|
80 | ); |
---|
81 | |
---|
82 | procedure Period ( |
---|
83 | ID : in RTEMS.ID; |
---|
84 | Length : in RTEMS.Interval; |
---|
85 | Result : out RTEMS.Status_Codes |
---|
86 | ); |
---|
87 | |
---|
88 | procedure Get_Status ( |
---|
89 | ID : in RTEMS.ID; |
---|
90 | Status : out RTEMS.Rate_Monotonic.Period_Status; |
---|
91 | Result : out RTEMS.Status_Codes |
---|
92 | ); |
---|
93 | |
---|
94 | procedure Reset_Statistics ( |
---|
95 | ID : in RTEMS.ID; |
---|
96 | Result : out RTEMS.Status_Codes |
---|
97 | ); |
---|
98 | |
---|
99 | procedure Reset_All_Statistics; |
---|
100 | pragma Import ( |
---|
101 | C, |
---|
102 | Reset_All_Statistics, |
---|
103 | "rtems_rate_monotonic_reset_all_statistics" |
---|
104 | ); |
---|
105 | |
---|
106 | procedure Report_Statistics; |
---|
107 | pragma Import ( |
---|
108 | C, |
---|
109 | Report_Statistics, |
---|
110 | "rtems_rate_monotonic_report_statistics" |
---|
111 | ); |
---|
112 | |
---|
113 | end RTEMS.Rate_Monotonic; |
---|
114 | |
---|