source: rtems/c/src/ada/rtems-partition.adb @ 4778c6e0

4.115
Last change on this file since 4778c6e0 was 1987020, checked in by Joel Sherrill <joel.sherrill@…>, on 02/16/11 at 15:52:29

2011-02-16 Joel Sherrill <joel.sherrill@…>

  • ada/Makefile.am, ada/preinstall.am, ada/rtems.adb, ada/rtems.ads: Split RTEMS Ada95 binding into a master package and a child package per Manager. This is better Ada style.
  • ada/rtems-barrier.adb, ada/rtems-barrier.ads, ada/rtems-clock.adb, ada/rtems-clock.ads, ada/rtems-cpu_usage.ads, ada/rtems-debug.adb, ada/rtems-debug.ads, ada/rtems-event.adb, ada/rtems-event.ads, ada/rtems-extension.adb, ada/rtems-extension.ads, ada/rtems-fatal.adb, ada/rtems-fatal.ads, ada/rtems-interrupt.ads, ada/rtems-io.adb, ada/rtems-io.ads, ada/rtems-message_queue.adb, ada/rtems-message_queue.ads, ada/rtems-object.adb, ada/rtems-object.ads, ada/rtems-partition.adb, ada/rtems-partition.ads, ada/rtems-port.adb, ada/rtems-port.ads, ada/rtems-rate_monotonic.adb, ada/rtems-rate_monotonic.ads, ada/rtems-region.adb, ada/rtems-region.ads, ada/rtems-semaphore.adb, ada/rtems-semaphore.ads, ada/rtems-signal.adb, ada/rtems-signal.ads, ada/rtems-stack_checker.ads, ada/rtems-tasks.adb, ada/rtems-tasks.ads, ada/rtems-timer.adb, ada/rtems-timer.ads: New files.
  • Property mode set to 100644
File size: 3.2 KB
Line 
1--
2--  RTEMS / Body
3--
4--  DESCRIPTION:
5--
6--  This package provides the interface to the RTEMS API.
7--
8--
9--  DEPENDENCIES:
10--
11--
12--
13--  COPYRIGHT (c) 1997-2011.
14--  On-Line Applications Research Corporation (OAR).
15--
16--  The license and distribution terms for this file may in
17--  the file LICENSE in this distribution or at
18--  http://www.rtems.com/license/LICENSE.
19--
20--  $Id$
21--
22
23package body RTEMS.Partition is
24
25   --
26   -- Partition Manager
27   --
28
29   procedure Create
30     (Name             : in RTEMS.Name;
31      Starting_Address : in RTEMS.Address;
32      Length           : in RTEMS.Unsigned32;
33      Buffer_Size      : in RTEMS.Unsigned32;
34      Attribute_Set    : in RTEMS.Attribute;
35      ID               : out RTEMS.ID;
36      Result           : out RTEMS.Status_Codes)
37   is
38      function Create_Base
39        (Name             : RTEMS.Name;
40         Starting_Address : RTEMS.Address;
41         Length           : RTEMS.Unsigned32;
42         Buffer_Size      : RTEMS.Unsigned32;
43         Attribute_Set    : RTEMS.Attribute;
44         ID               : access RTEMS.Event_Set)
45         return             RTEMS.Status_Codes;
46      pragma Import (C, Create_Base, "rtems_partition_create");
47      ID_Base : aliased RTEMS.ID;
48   begin
49
50      Result :=
51         Create_Base
52           (Name,
53            Starting_Address,
54            Length,
55            Buffer_Size,
56            Attribute_Set,
57            ID_Base'Access);
58      ID     := ID_Base;
59
60   end Create;
61
62   procedure Ident
63     (Name   : in RTEMS.Name;
64      Node   : in RTEMS.Unsigned32;
65      ID     : out RTEMS.ID;
66      Result : out RTEMS.Status_Codes)
67   is
68      function Ident_Base
69        (Name : RTEMS.Name;
70         Node : RTEMS.Unsigned32;
71         ID   : access RTEMS.Event_Set)
72         return RTEMS.Status_Codes;
73      pragma Import (C, Ident_Base, "rtems_partition_ident");
74      ID_Base : aliased RTEMS.ID;
75   begin
76
77      Result := Ident_Base (Name, Node, ID_Base'Access);
78      ID     := ID_Base;
79
80   end Ident;
81
82   procedure Delete
83     (ID     : in RTEMS.ID;
84      Result : out RTEMS.Status_Codes)
85   is
86      function Delete_Base
87        (ID   : RTEMS.ID)
88         return RTEMS.Status_Codes;
89      pragma Import (C, Delete_Base, "rtems_partition_delete");
90   begin
91
92      Result := Delete_Base (ID);
93
94   end Delete;
95
96   procedure Get_Buffer
97     (ID     : in RTEMS.ID;
98      Buffer : out RTEMS.Address;
99      Result : out RTEMS.Status_Codes)
100   is
101      function Get_Buffer_Base
102        (ID     : RTEMS.ID;
103         Buffer : access RTEMS.Address)
104         return   RTEMS.Status_Codes;
105      pragma Import
106        (C,
107         Get_Buffer_Base,
108         "rtems_partition_get_buffer");
109      Buffer_Base : aliased RTEMS.Address;
110   begin
111
112      Result := Get_Buffer_Base (ID, Buffer_Base'Access);
113      Buffer := Buffer_Base;
114
115   end Get_Buffer;
116
117   procedure Return_Buffer
118     (ID     : in RTEMS.ID;
119      Buffer : in RTEMS.Address;
120      Result : out RTEMS.Status_Codes)
121   is
122      function Return_Buffer_Base
123        (ID     : RTEMS.Name;
124         Buffer : RTEMS.Address)
125         return   RTEMS.Status_Codes;
126      pragma Import
127        (C,
128         Return_Buffer_Base,
129         "rtems_partition_return_buffer");
130   begin
131
132      Result := Return_Buffer_Base (ID, Buffer);
133
134   end Return_Buffer;
135
136end RTEMS.Partition;
Note: See TracBrowser for help on using the repository browser.