1 -- Copyright 2009-2012 Free Software Foundation, Inc.
3 -- This program is free software; you can redistribute it and/or modify
4 -- it under the terms of the GNU General Public License as published by
5 -- the Free Software Foundation; either version 3 of the License, or
6 -- (at your option) any later version.
8 -- This program is distributed in the hope that it will be useful,
9 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
10 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 -- GNU General Public License for more details.
13 -- You should have received a copy of the GNU General Public License
14 -- along with this program. If not, see <http://www.gnu.org/licenses/>.
23 type Caller_Ptr is access Caller;
35 accept Call_Break_Me do
43 Task_List : array (1 .. 3) of Caller_Ptr;
47 -- Start all our tasks, and call the "Initialize" entry to make
48 -- sure all of them have now been started. We call that entry
49 -- immediately after having created the task in order to make sure
50 -- that we wait for that task to be created before we try to create
51 -- another one. That way, we know that the order in our Task_List
52 -- corresponds to the order in the GNAT runtime.
53 for J in Task_List'Range loop
54 Task_List (J) := new Caller;
55 Task_List (J).Initialize;
58 -- Next, call their Call_Break_Me entry of each task, using the same
59 -- order as the order used to create them.
60 for J in Task_List'Range loop -- STOP_HERE
61 Task_List (J).Call_Break_Me;
64 -- And finally, let all the tasks die...
65 for J in Task_List'Range loop
66 Task_List (J).Finalize;