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.org/license/LICENSE. |
---|
19 | -- |
---|
20 | |
---|
21 | package body RTEMS.Event is |
---|
22 | |
---|
23 | -- |
---|
24 | -- Event Manager |
---|
25 | -- |
---|
26 | |
---|
27 | procedure Send |
---|
28 | (ID : in RTEMS.ID; |
---|
29 | Event_In : in RTEMS.Event_Set; |
---|
30 | Result : out RTEMS.Status_Codes) |
---|
31 | is |
---|
32 | function Send_Base |
---|
33 | (ID : RTEMS.ID; |
---|
34 | Event_In : RTEMS.Event_Set) |
---|
35 | return RTEMS.Status_Codes; |
---|
36 | pragma Import (C, Send_Base, "rtems_event_send"); |
---|
37 | begin |
---|
38 | |
---|
39 | Result := Send_Base (ID, Event_In); |
---|
40 | |
---|
41 | end Send; |
---|
42 | |
---|
43 | procedure Receive |
---|
44 | (Event_In : in RTEMS.Event_Set; |
---|
45 | Option_Set : in RTEMS.Option; |
---|
46 | Ticks : in RTEMS.Interval; |
---|
47 | Event_Out : out RTEMS.Event_Set; |
---|
48 | Result : out RTEMS.Status_Codes) |
---|
49 | is |
---|
50 | function Receive_Base |
---|
51 | (Event_In : RTEMS.Event_Set; |
---|
52 | Option_Set : RTEMS.Option; |
---|
53 | Ticks : RTEMS.Interval; |
---|
54 | Event_Out : access RTEMS.Event_Set) |
---|
55 | return RTEMS.Status_Codes; |
---|
56 | pragma Import (C, Receive_Base, "rtems_event_receive"); |
---|
57 | Event_Out_Base : aliased RTEMS.Event_Set; |
---|
58 | begin |
---|
59 | |
---|
60 | Result := |
---|
61 | Receive_Base |
---|
62 | (Event_In, |
---|
63 | Option_Set, |
---|
64 | Ticks, |
---|
65 | Event_Out_Base'Access); |
---|
66 | Event_Out := Event_Out_Base; |
---|
67 | |
---|
68 | end Receive; |
---|
69 | |
---|
70 | end RTEMS.Event; |
---|