1 ------------------------------------------------------------------------------
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
5 -- S Y S T E M . T A S K I N G . R E N D E Z V O U S --
9 -- $Revision: 1.26 $ --
11 -- Copyright (C) 1992-1998, Free Software Foundation, Inc. --
13 -- GNARL is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNARL; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
24 -- As a special exception, if other files instantiate generics from this --
25 -- unit, or you link this unit with other files to produce an executable, --
26 -- this unit does not by itself cause the resulting executable to be --
27 -- covered by the GNU General Public License. This exception does not --
28 -- however invalidate any other reasons why the executable file might be --
29 -- covered by the GNU Public License. --
31 -- GNARL was developed by the GNARL team at Florida State University. It is --
32 -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
33 -- State University (http://www.gnat.com). --
35 ------------------------------------------------------------------------------
37 -- Note: the compiler generates direct calls to this interface, via Rtsfind.
38 -- Any changes to this interface may require corresponding compiler changes.
41 -- Used for, Exception_Id
43 with System
.Tasking
.Protected_Objects
.Entries
;
44 -- used for Protection_Entries
46 package System
.Tasking
.Rendezvous
is
47 -- This interface is described in the document
48 -- Gnu Ada Runtime Library Interface (GNARLI).
50 package STPE
renames System
.Tasking
.Protected_Objects
.Entries
;
52 procedure Task_Entry_Call
55 Uninterpreted_Data
: System
.Address
;
57 Rendezvous_Successful
: out Boolean);
60 procedure Timed_Task_Entry_Call
63 Uninterpreted_Data
: System
.Address
;
66 Rendezvous_Successful
: out Boolean);
67 -- Timed entry call without using ATC.
72 Uninterpreted_Data
: System
.Address
);
75 procedure Cancel_Task_Entry_Call
(Cancelled
: out Boolean);
76 -- Cancel pending task entry call
78 procedure Requeue_Task_Entry
81 With_Abort
: Boolean);
83 procedure Requeue_Protected_To_Task_Entry
84 (Object
: STPE
.Protection_Entries_Access
;
87 With_Abort
: Boolean);
89 procedure Selective_Wait
90 (Open_Accepts
: Accept_List_Access
;
91 Select_Mode
: Select_Modes
;
92 Uninterpreted_Data
: out System
.Address
;
93 Index
: out Select_Index
);
96 procedure Timed_Selective_Wait
97 (Open_Accepts
: Accept_List_Access
;
98 Select_Mode
: Select_Modes
;
99 Uninterpreted_Data
: out System
.Address
;
102 Index
: out Select_Index
);
103 -- Selective wait with timeout without using ATC.
105 procedure Accept_Call
106 (E
: Task_Entry_Index
;
107 Uninterpreted_Data
: out System
.Address
);
108 -- Accept an entry call
110 procedure Accept_Trivial
(E
: Task_Entry_Index
);
111 -- Accept an entry call that has no parameters and no body
113 function Task_Count
(E
: Task_Entry_Index
) return Natural;
114 -- Return number of tasks waiting on the entry E (of current task)
116 function Callable
(T
: Task_ID
) return Boolean;
119 type Task_Entry_Nesting_Depth
is new Task_Entry_Index
120 range 0 .. Max_Task_Entry
;
122 function Task_Entry_Caller
(D
: Task_Entry_Nesting_Depth
) return Task_ID
;
123 -- Return E'Caller. This will only work if called from within an
124 -- accept statement that is handling E, as required by the
127 procedure Complete_Rendezvous
;
128 -- Called by acceptor to wake up caller
130 procedure Exceptional_Complete_Rendezvous
131 (Ex
: Ada
.Exceptions
.Exception_Id
);
132 -- Called by acceptor to mark the end of the current rendezvous and
133 -- propagate an exception to the caller.
135 -- For internal use only:
137 function Task_Do_Or_Queue
139 Entry_Call
: Entry_Call_Link
;
140 With_Abort
: Boolean) return Boolean;
141 -- Call this only with abort deferred and holding lock of Acceptor.
142 -- Returns False iff the call cannot be served or queued, as is the
143 -- case if the caller is not callable; i.e., a False return value
144 -- indicates that Tasking_Error should be raised.
145 -- Either initiate the entry call, such that the accepting task is
146 -- free to execute the rendezvous, queue the call on the acceptor's
147 -- queue, or cancel the call. Conditional calls that cannot be
148 -- accepted immediately are cancelled.
150 end System
.Tasking
.Rendezvous
;