source:
rtems/c/src/ada/rtems-rate_monotonic.ads
@
1987020
Last change on this file since 1987020 was 1987020, checked in by Joel Sherrill <joel.sherrill@…>, on 02/16/11 at 15:52:29 | |
---|---|
|
|
File size: 2.8 KB |
Line | |
---|---|
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.com/license/LICENSE. |
20 | -- |
21 | -- $Id$ |
22 | -- |
23 | |
24 | package RTEMS.Rate_Monotonic is |
25 | |
26 | -- |
27 | -- The following type defines the status information returned |
28 | -- about a period. |
29 | -- |
30 | |
31 | type Period_States is ( |
32 | Inactive, -- off chain, never initialized |
33 | Owner_Is_Blocking, -- on chain, owner is blocking on it |
34 | Active, -- on chain, running continuously |
35 | Expired_While_Blocking, -- on chain, expired while owner was was blocking |
36 | Expired -- off chain, will be reset by next |
37 | -- rtems_rate_monotonic_period |
38 | ); |
39 | |
40 | for Period_States'Size use 32; |
41 | |
42 | for Period_States use ( |
43 | Inactive => 0, |
44 | Owner_Is_Blocking => 1, |
45 | Active => 2, |
46 | Expired_While_Blocking => 3, |
47 | Expired => 4 |
48 | ); |
49 | |
50 | type Period_Status is |
51 | record |
52 | Owner : RTEMS.ID; |
53 | State : RTEMS.Rate_Monotonic.Period_States; |
54 | Ticks_Since_Last_Period : RTEMS.Unsigned32; |
55 | Ticks_Executed_Since_Last_Period : RTEMS.Unsigned32; |
56 | end record; |
57 | |
58 | -- |
59 | -- Rate Monotonic Manager |
60 | -- |
61 | |
62 | procedure Create ( |
63 | Name : in RTEMS.Name; |
64 | ID : out RTEMS.ID; |
65 | Result : out RTEMS.Status_Codes |
66 | ); |
67 | |
68 | procedure Ident ( |
69 | Name : in RTEMS.Name; |
70 | ID : out RTEMS.ID; |
71 | Result : out RTEMS.Status_Codes |
72 | ); |
73 | |
74 | procedure Delete ( |
75 | ID : in RTEMS.ID; |
76 | Result : out RTEMS.Status_Codes |
77 | ); |
78 | |
79 | procedure Cancel ( |
80 | ID : in RTEMS.ID; |
81 | Result : out RTEMS.Status_Codes |
82 | ); |
83 | |
84 | procedure Period ( |
85 | ID : in RTEMS.ID; |
86 | Length : in RTEMS.Interval; |
87 | Result : out RTEMS.Status_Codes |
88 | ); |
89 | |
90 | procedure Get_Status ( |
91 | ID : in RTEMS.ID; |
92 | Status : out RTEMS.Rate_Monotonic.Period_Status; |
93 | Result : out RTEMS.Status_Codes |
94 | ); |
95 | |
96 | procedure Reset_Statistics ( |
97 | ID : in RTEMS.ID; |
98 | Result : out RTEMS.Status_Codes |
99 | ); |
100 | |
101 | procedure Reset_All_Statistics; |
102 | pragma Import ( |
103 | C, |
104 | Reset_All_Statistics, |
105 | "rtems_rate_monotonic_reset_all_statistics" |
106 | ); |
107 | |
108 | procedure Report_Statistics; |
109 | pragma Import ( |
110 | C, |
111 | Report_Statistics, |
112 | "rtems_rate_monotonic_report_statistics" |
113 | ); |
114 | |
115 | end RTEMS.Rate_Monotonic; |
116 |
Note: See TracBrowser
for help on using the repository browser.