Warning, /cpukit/include/adainclude/rtems-rate_monotonic.adb is written in an unsupported language. File is not indexed.
0001 -- SPDX-License-Identifier: BSD-2-Clause
0002
0003 --
0004 -- RTEMS / Body
0005 --
0006 -- DESCRIPTION:
0007 --
0008 -- This package provides the interface to the RTEMS API.
0009 --
0010 --
0011 -- DEPENDENCIES:
0012 --
0013 --
0014 --
0015 -- COPYRIGHT (c) 1997-2011.
0016 -- On-Line Applications Research Corporation (OAR).
0017 --
0018 -- Redistribution and use in source and binary forms, with or without
0019 -- modification, are permitted provided that the following conditions
0020 -- are met:
0021 -- 1. Redistributions of source code must retain the above copyright
0022 -- notice, this list of conditions and the following disclaimer.
0023 -- 2. Redistributions in binary form must reproduce the above copyright
0024 -- notice, this list of conditions and the following disclaimer in the
0025 -- documentation and/or other materials provided with the distribution.
0026 --
0027 -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0028 -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0029 -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0030 -- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0031 -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0032 -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0033 -- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0034 -- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0035 -- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0036 -- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0037 -- POSSIBILITY OF SUCH DAMAGE.
0038 --
0039
0040 package body RTEMS.Rate_Monotonic is
0041
0042 --
0043 -- Rate Monotonic Manager
0044 --
0045
0046 procedure Create
0047 (Name : in RTEMS.Name;
0048 ID : out RTEMS.ID;
0049 Result : out RTEMS.Status_Codes)
0050 is
0051 function Create_Base
0052 (Name : RTEMS.Name;
0053 ID : access RTEMS.ID)
0054 return RTEMS.Status_Codes;
0055 pragma Import
0056 (C,
0057 Create_Base,
0058 "rtems_rate_monotonic_create");
0059 ID_Base : aliased RTEMS.ID;
0060 begin
0061
0062 Result := Create_Base (Name, ID_Base'Access);
0063 ID := ID_Base;
0064
0065 end Create;
0066
0067 procedure Ident
0068 (Name : in RTEMS.Name;
0069 ID : out RTEMS.ID;
0070 Result : out RTEMS.Status_Codes)
0071 is
0072 function Ident_Base
0073 (Name : RTEMS.Name;
0074 ID : access RTEMS.ID)
0075 return RTEMS.Status_Codes;
0076 pragma Import
0077 (C,
0078 Ident_Base,
0079 "rtems_rate_monotonic_ident");
0080 ID_Base : aliased RTEMS.ID;
0081 begin
0082
0083 Result := Ident_Base (Name, ID_Base'Access);
0084
0085 ID := ID_Base;
0086
0087 end Ident;
0088
0089 procedure Delete
0090 (ID : in RTEMS.ID;
0091 Result : out RTEMS.Status_Codes)
0092 is
0093 function Delete_Base
0094 (ID : RTEMS.ID)
0095 return RTEMS.Status_Codes;
0096 pragma Import
0097 (C,
0098 Delete_Base,
0099 "rtems_rate_monotonic_delete");
0100 begin
0101
0102 Result := Delete_Base (ID);
0103
0104 end Delete;
0105
0106 procedure Cancel
0107 (ID : in RTEMS.ID;
0108 Result : out RTEMS.Status_Codes)
0109 is
0110 function Cancel_Base
0111 (ID : RTEMS.ID)
0112 return RTEMS.Status_Codes;
0113 pragma Import
0114 (C,
0115 Cancel_Base,
0116 "rtems_rate_monotonic_cancel");
0117 begin
0118
0119 Result := Cancel_Base (ID);
0120
0121 end Cancel;
0122
0123 procedure Period
0124 (ID : in RTEMS.ID;
0125 Length : in RTEMS.Interval;
0126 Result : out RTEMS.Status_Codes)
0127 is
0128 function Period_Base
0129 (ID : RTEMS.ID;
0130 Length : RTEMS.Interval)
0131 return RTEMS.Status_Codes;
0132 pragma Import
0133 (C,
0134 Period_Base,
0135 "rtems_rate_monotonic_period");
0136 begin
0137
0138 Result := Period_Base (ID, Length);
0139
0140 end Period;
0141
0142 procedure Get_Status
0143 (ID : in RTEMS.ID;
0144 Status : out RTEMS.Rate_Monotonic.Period_Status;
0145 Result : out RTEMS.Status_Codes)
0146 is
0147 function Get_Status_Base
0148 (ID : RTEMS.ID;
0149 Status : access RTEMS.Rate_Monotonic.Period_Status)
0150 return RTEMS.Status_Codes;
0151 pragma Import
0152 (C,
0153 Get_Status_Base,
0154 "rtems_rate_monotonic_get_status");
0155
0156 Status_Base : aliased RTEMS.Rate_Monotonic.Period_Status;
0157 begin
0158
0159 Result := Get_Status_Base (ID, Status_Base'Access);
0160
0161 Status := Status_Base;
0162
0163 end Get_Status;
0164
0165 procedure Reset_Statistics
0166 (ID : in RTEMS.ID;
0167 Result : out RTEMS.Status_Codes)
0168 is
0169 function Reset_Statistics_Base
0170 (ID : RTEMS.ID)
0171 return RTEMS.Status_Codes;
0172 pragma Import
0173 (C,
0174 Reset_Statistics_Base,
0175 "rtems_rate_monotonic_reset_statistics");
0176 begin
0177
0178 Result := Reset_Statistics_Base (ID);
0179
0180 end Reset_Statistics;
0181
0182 end RTEMS.Rate_Monotonic;