1 ------------------------------------------------------------------------------
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
5 -- S Y S T E M . T A S K I N G . E N T R Y _ C A L L S --
9 -- $Revision: 1.12 $ --
11 -- Copyright (C) 1991-1998, Florida State University --
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 package System
.Tasking
.Entry_Calls
is
39 procedure Wait_For_Completion
41 Entry_Call
: Entry_Call_Link
);
42 -- This procedure suspends the calling task until the specified entry
43 -- call has either been completed or cancelled. It performs other
44 -- operations required of suspended tasks, such as performing
45 -- dynamic priority changes. On exit, the call will not be queued.
46 -- This waits for calls on task or protected entries.
47 -- Abortion must be deferred when calling this procedure.
48 -- Call this only when holding Self_ID locked.
50 procedure Wait_For_Completion_With_Timeout
52 Entry_Call
: Entry_Call_Link
;
53 Wakeup_Time
: Duration;
55 -- Same as Wait_For_Completion but it wait for a timeout with the value
56 -- specified in Wakeup_Time as well.
57 -- Self_ID will be locked by this procedure.
59 procedure Wait_Until_Abortable
61 Call
: Entry_Call_Link
);
62 -- This procedure suspends the calling task until the specified entry
63 -- call is queued abortably or completes.
64 -- Abortion must be deferred when calling this procedure.
66 procedure Try_To_Cancel_Entry_Call
(Succeeded
: out Boolean);
67 pragma Inline
(Try_To_Cancel_Entry_Call
);
68 -- Try to cancel async. entry call.
69 -- Effect includes Abort_To_Level and Wait_For_Completion.
70 -- Cancelled = True iff the cancelation was successful, i.e.,
71 -- the call was not Done before this call.
72 -- On return, the call is off-queue and the ATC level is reduced by one.
74 procedure Reset_Priority
75 (Acceptor_Prev_Priority
: Rendezvous_Priority
;
77 pragma Inline
(Reset_Priority
);
78 -- Reset the priority of a task completing an accept statement to
79 -- the value it had before the call.
81 procedure Check_Exception
83 Entry_Call
: Entry_Call_Link
);
84 pragma Inline
(Check_Exception
);
85 -- Raise any pending exception from the Entry_Call.
86 -- This should be called at the end of every compiler interface
87 -- procedure that implements an entry call.
88 -- In principle, the caller should not be abort-deferred (unless
89 -- the application program violates the Ada language rules by doing
90 -- entry calls from within protected operations -- an erroneous practice
91 -- apparently followed with success by some adventurous GNAT users).
92 -- Absolutely, the caller should not be holding any locks, or there
95 end System
.Tasking
.Entry_Calls
;