Warning, /cpukit/include/adainclude/rtems-partition.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.Partition is
0041
0042 --
0043 -- Partition Manager
0044 --
0045
0046 procedure Create
0047 (Name : in RTEMS.Name;
0048 Starting_Address : in RTEMS.Address;
0049 Length : in RTEMS.Size;
0050 Buffer_Size : in RTEMS.Size;
0051 Attribute_Set : in RTEMS.Attribute;
0052 ID : out RTEMS.ID;
0053 Result : out RTEMS.Status_Codes)
0054 is
0055 function Create_Base
0056 (Name : RTEMS.Name;
0057 Starting_Address : RTEMS.Address;
0058 Length : RTEMS.Size;
0059 Buffer_Size : RTEMS.Size;
0060 Attribute_Set : RTEMS.Attribute;
0061 ID : access RTEMS.Event_Set)
0062 return RTEMS.Status_Codes;
0063 pragma Import (C, Create_Base, "rtems_partition_create");
0064 ID_Base : aliased RTEMS.ID;
0065 begin
0066
0067 Result :=
0068 Create_Base
0069 (Name,
0070 Starting_Address,
0071 Length,
0072 Buffer_Size,
0073 Attribute_Set,
0074 ID_Base'Access);
0075 ID := ID_Base;
0076
0077 end Create;
0078
0079 procedure Ident
0080 (Name : in RTEMS.Name;
0081 Node : in RTEMS.Unsigned32;
0082 ID : out RTEMS.ID;
0083 Result : out RTEMS.Status_Codes)
0084 is
0085 function Ident_Base
0086 (Name : RTEMS.Name;
0087 Node : RTEMS.Unsigned32;
0088 ID : access RTEMS.Event_Set)
0089 return RTEMS.Status_Codes;
0090 pragma Import (C, Ident_Base, "rtems_partition_ident");
0091 ID_Base : aliased RTEMS.ID;
0092 begin
0093
0094 Result := Ident_Base (Name, Node, ID_Base'Access);
0095 ID := ID_Base;
0096
0097 end Ident;
0098
0099 procedure Delete
0100 (ID : in RTEMS.ID;
0101 Result : out RTEMS.Status_Codes)
0102 is
0103 function Delete_Base
0104 (ID : RTEMS.ID)
0105 return RTEMS.Status_Codes;
0106 pragma Import (C, Delete_Base, "rtems_partition_delete");
0107 begin
0108
0109 Result := Delete_Base (ID);
0110
0111 end Delete;
0112
0113 procedure Get_Buffer
0114 (ID : in RTEMS.ID;
0115 Buffer : out RTEMS.Address;
0116 Result : out RTEMS.Status_Codes)
0117 is
0118 function Get_Buffer_Base
0119 (ID : RTEMS.ID;
0120 Buffer : access RTEMS.Address)
0121 return RTEMS.Status_Codes;
0122 pragma Import
0123 (C,
0124 Get_Buffer_Base,
0125 "rtems_partition_get_buffer");
0126 Buffer_Base : aliased RTEMS.Address;
0127 begin
0128
0129 Result := Get_Buffer_Base (ID, Buffer_Base'Access);
0130 Buffer := Buffer_Base;
0131
0132 end Get_Buffer;
0133
0134 procedure Return_Buffer
0135 (ID : in RTEMS.ID;
0136 Buffer : in RTEMS.Address;
0137 Result : out RTEMS.Status_Codes)
0138 is
0139 function Return_Buffer_Base
0140 (ID : RTEMS.Name;
0141 Buffer : RTEMS.Address)
0142 return RTEMS.Status_Codes;
0143 pragma Import
0144 (C,
0145 Return_Buffer_Base,
0146 "rtems_partition_return_buffer");
0147 begin
0148
0149 Result := Return_Buffer_Base (ID, Buffer);
0150
0151 end Return_Buffer;
0152
0153 end RTEMS.Partition;