source: rtems/c/src/ada-tests/mptests/mp09/mptest.adb @ 0f4b25df

4.104.114.84.95
Last change on this file since 0f4b25df was 35e4691, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 4, 2003 at 6:50:41 PM

2003-09-04 Joel Sherrill <joel@…>

  • mptests/mp01/config.h, mptests/mp01/mp01.adb, mptests/mp01/mptest.adb, mptests/mp01/mptest.ads, mptests/mp02/mptest.adb, mptests/mp02/mptest.ads, mptests/mp03/mptest.adb, mptests/mp03/mptest.ads, mptests/mp04/mptest.adb, mptests/mp04/mptest.ads, mptests/mp05/mptest.adb, mptests/mp05/mptest.ads, mptests/mp06/mptest.adb, mptests/mp06/mptest.ads, mptests/mp07/mptest.adb, mptests/mp07/mptest.ads, mptests/mp08/mptest.adb, mptests/mp08/mptest.ads, mptests/mp09/mptest.adb, mptests/mp09/mptest.ads, mptests/mp10/mptest.adb, mptests/mp10/mptest.ads, mptests/mp11/mptest.adb, mptests/mp11/mptest.ads, mptests/mp12/mptest.adb, mptests/mp12/mptest.ads, mptests/mp13/mptest.adb, mptests/mp13/mptest.ads, mptests/mp14/mptest.adb, mptests/mp14/mptest.ads, samples/base_mp/config.h, samples/base_mp/mptest.adb, samples/base_mp/mptest.ads, samples/base_sp/base_sp.adb, samples/base_sp/config.h, samples/base_sp/sptest.adb, samples/base_sp/sptest.ads, samples/hello/config.h, samples/hello/hello.adb, samples/hello/sptest.adb, samples/hello/sptest.ads, samples/ticker/config.h, samples/ticker/sptest.adb, samples/ticker/sptest.ads, samples/ticker/ticker.adb, sptests/sp01/config.h, sptests/sp01/sp01.adb, sptests/sp01/sptest.adb, sptests/sp01/sptest.ads, sptests/sp02/config.h, sptests/sp02/sp02.adb, sptests/sp02/sptest.adb, sptests/sp02/sptest.ads, sptests/sp03/config.h, sptests/sp03/sp03.adb, sptests/sp03/sptest.adb, sptests/sp03/sptest.ads, sptests/sp04/config.h, sptests/sp04/sp04.adb, sptests/sp04/sptest.adb, sptests/sp04/sptest.ads, sptests/sp05/config.h, sptests/sp05/sp05.adb, sptests/sp05/sptest.adb, sptests/sp05/sptest.ads, sptests/sp06/config.h, sptests/sp06/sp06.adb, sptests/sp06/sptest.adb, sptests/sp06/sptest.ads, sptests/sp07/config.h, sptests/sp07/sp07.adb, sptests/sp07/sptest.adb, sptests/sp07/sptest.ads, sptests/sp08/config.h, sptests/sp08/sp08.adb, sptests/sp08/sptest.adb, sptests/sp08/sptest.ads, sptests/sp09/config.h, sptests/sp09/sp09.adb, sptests/sp09/sptest.adb, sptests/sp09/sptest.ads, sptests/sp11/config.h, sptests/sp11/sp11.adb, sptests/sp11/sptest.adb, sptests/sp11/sptest.ads, sptests/sp12/config.h, sptests/sp12/sp12.adb, sptests/sp12/sptest.adb, sptests/sp12/sptest.ads, sptests/sp13/config.h, sptests/sp13/sp13.adb, sptests/sp13/sptest.adb, sptests/sp13/sptest.ads, sptests/sp14/config.h, sptests/sp14/sp14.adb, sptests/sp14/sptest.adb, sptests/sp14/sptest.ads, sptests/sp15/config.h, sptests/sp15/sp15.adb, sptests/sp15/sptest.adb, sptests/sp15/sptest.ads, sptests/sp16/config.h, sptests/sp16/sp16.adb, sptests/sp16/sptest.adb, sptests/sp16/sptest.ads, sptests/sp17/config.h, sptests/sp17/sp17.adb, sptests/sp17/sptest.adb, sptests/sp17/sptest.ads, sptests/sp19/config.h, sptests/sp19/sp19.adb, sptests/sp19/sptest.ads, sptests/sp20/config.h, sptests/sp20/sp20.adb, sptests/sp20/sptest.adb, sptests/sp20/sptest.ads, sptests/sp21/config.h, sptests/sp21/sp21.adb, sptests/sp21/sptest.adb, sptests/sp21/sptest.ads, sptests/sp22/config.h, sptests/sp22/sp22.adb, sptests/sp22/sptest.adb, sptests/sp22/sptest.ads, sptests/sp23/config.h, sptests/sp23/sp23.adb, sptests/sp23/sptest.adb, sptests/sp23/sptest.ads, sptests/sp24/config.h, sptests/sp24/sp24.adb, sptests/sp24/sptest.adb, sptests/sp24/sptest.ads, sptests/sp25/config.h, sptests/sp25/sp25.adb, sptests/sp25/sptest.adb, sptests/sp25/sptest.ads, sptests/spsize/spsize.adb, sptests/spsize/sptest.adb, sptests/spsize/sptest.ads, support/address_io.adb, support/address_io.ads, support/float_io.ads, support/fp.inc, support/integer.inc, support/rtems_calling_overhead.ads, support/status_io.ads, support/test_support.adb, support/test_support.ads, support/time_test_support.adb, support/time_test_support.ads, support/timer_driver.adb, support/timer_driver.ads, support/unsigned32_io.ads, tmtests/tm01/config.h, tmtests/tm01/tm01.adb, tmtests/tm01/tmtest.adb, tmtests/tm01/tmtest.ads, tmtests/tm02/config.h, tmtests/tm02/tm02.adb, tmtests/tm02/tmtest.adb, tmtests/tm02/tmtest.ads, tmtests/tm03/config.h, tmtests/tm03/tm03.adb, tmtests/tm03/tmtest.adb, tmtests/tm03/tmtest.ads, tmtests/tm04/config.h, tmtests/tm04/tm04.adb, tmtests/tm04/tmtest.adb, tmtests/tm04/tmtest.ads, tmtests/tm05/config.h, tmtests/tm05/tm05.adb, tmtests/tm05/tmtest.adb, tmtests/tm05/tmtest.ads, tmtests/tm06/config.h, tmtests/tm06/tm06.adb, tmtests/tm06/tmtest.adb, tmtests/tm06/tmtest.ads, tmtests/tm07/config.h, tmtests/tm07/tm07.adb, tmtests/tm07/tmtest.adb, tmtests/tm07/tmtest.ads, tmtests/tm08/config.h, tmtests/tm08/tm08.adb, tmtests/tm08/tmtest.adb, tmtests/tm08/tmtest.ads, tmtests/tm09/config.h, tmtests/tm09/tm09.adb, tmtests/tm09/tmtest.adb, tmtests/tm09/tmtest.ads, tmtests/tm10/config.h, tmtests/tm10/tm10.adb, tmtests/tm10/tmtest.adb, tmtests/tm10/tmtest.ads, tmtests/tm11/config.h, tmtests/tm11/tm11.adb, tmtests/tm11/tmtest.adb, tmtests/tm11/tmtest.ads, tmtests/tm12/config.h, tmtests/tm12/tm12.adb, tmtests/tm12/tmtest.adb, tmtests/tm12/tmtest.ads, tmtests/tm13/config.h, tmtests/tm13/tm13.adb, tmtests/tm13/tmtest.adb, tmtests/tm13/tmtest.ads, tmtests/tm14/config.h, tmtests/tm14/tm14.adb, tmtests/tm14/tmtest.adb, tmtests/tm14/tmtest.ads, tmtests/tm15/config.h, tmtests/tm15/tm15.adb, tmtests/tm15/tmtest.adb, tmtests/tm15/tmtest.ads, tmtests/tm16/config.h, tmtests/tm16/tm16.adb, tmtests/tm16/tmtest.adb, tmtests/tm16/tmtest.ads, tmtests/tm17/config.h, tmtests/tm17/tm17.adb, tmtests/tm17/tmtest.adb, tmtests/tm17/tmtest.ads, tmtests/tm18/config.h, tmtests/tm18/tm18.adb, tmtests/tm18/tmtest.adb, tmtests/tm18/tmtest.ads, tmtests/tm19/config.h, tmtests/tm19/tm19.adb, tmtests/tm19/tmtest.adb, tmtests/tm19/tmtest.ads, tmtests/tm20/config.h, tmtests/tm20/tm20.adb, tmtests/tm20/tmtest.adb, tmtests/tm20/tmtest.ads, tmtests/tm21/config.h, tmtests/tm21/tm21.adb, tmtests/tm21/tmtest.adb, tmtests/tm21/tmtest.ads, tmtests/tm22/config.h, tmtests/tm22/tm22.adb, tmtests/tm22/tmtest.adb, tmtests/tm22/tmtest.ads, tmtests/tm23/config.h, tmtests/tm23/tm23.adb, tmtests/tm23/tmtest.adb, tmtests/tm23/tmtest.ads, tmtests/tm24/config.h, tmtests/tm24/tm24.adb, tmtests/tm24/tmtest.adb, tmtests/tm24/tmtest.ads, tmtests/tm25/config.h, tmtests/tm25/tm25.adb, tmtests/tm25/tmtest.adb, tmtests/tm25/tmtest.ads, tmtests/tm28/config.h, tmtests/tm28/tm28.adb, tmtests/tm28/tmtest.adb, tmtests/tm28/tmtest.ads, tmtests/tm29/config.h, tmtests/tm29/tm29.adb, tmtests/tm29/tmtest.adb, tmtests/tm29/tmtest.ads, tmtests/tmck/config.h, tmtests/tmck/tmck.adb, tmtests/tmck/tmtest.adb, tmtests/tmck/tmtest.ads, tmtests/tmoverhd/config.h, tmtests/tmoverhd/dummy_rtems.adb, tmtests/tmoverhd/dummy_rtems.ads, tmtests/tmoverhd/tmoverhd.adb, tmtests/tmoverhd/tmtest.adb, tmtests/tmoverhd/tmtest.ads: URL for license changed.
  • Property mode set to 100644
File size: 9.7 KB
Line 
1--
2--  MPTEST / BODY
3--
4--  DESCRIPTION:
5--
6--  This package is the implementation for Test 9 of the RTEMS
7--  Multiprocessor Test Suite.
8--
9--  DEPENDENCIES:
10--
11--
12--
13--  COPYRIGHT (c) 1989-1997.
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
23with INTERFACES; use INTERFACES;
24with RTEMS;
25with TEST_SUPPORT;
26with TEXT_IO;
27with UNSIGNED32_IO;
28
29package body MPTEST is
30
31   package body PER_NODE_CONFIGURATION is separate;
32
33--PAGE
34--
35--  INIT
36--
37
38   procedure INIT (
39      ARGUMENT : in     RTEMS.TASK_ARGUMENT
40   ) is
41      STATUS : RTEMS.STATUS_CODES;
42   begin
43
44      TEXT_IO.NEW_LINE( 2 );
45      TEXT_IO.PUT( "*** TEST 9 -- NODE " );
46      UNSIGNED32_IO.PUT(
47         MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
48         WIDTH => 1
49      );
50      TEXT_IO.PUT_LINE( " ***" );
51
52      MPTEST.RECEIVE_BUFFER :=
53         RTEMS.TO_BUFFER_POINTER( MPTEST.RECEIVE_BUFFER_AREA'ADDRESS );
54
55      MPTEST.BUFFER_1 :=
56         RTEMS.TO_BUFFER_POINTER( MPTEST.BUFFER_AREA_1'ADDRESS );
57
58      MPTEST.BUFFER_2 :=
59         RTEMS.TO_BUFFER_POINTER( MPTEST.BUFFER_AREA_2'ADDRESS );
60
61      MPTEST.BUFFER_3 :=
62         RTEMS.TO_BUFFER_POINTER( MPTEST.BUFFER_AREA_3'ADDRESS );
63
64      MPTEST.BUFFER_4 :=
65         RTEMS.TO_BUFFER_POINTER( MPTEST.BUFFER_AREA_4'ADDRESS );
66
67      MPTEST.FILL_BUFFER( "123456789012345 ", MPTEST.BUFFER_AREA_1 );
68      MPTEST.FILL_BUFFER( "abcdefghijklmno ", MPTEST.BUFFER_AREA_2 );
69      MPTEST.FILL_BUFFER( "ABCDEFGHIJKLMNO ", MPTEST.BUFFER_AREA_3 );
70      MPTEST.FILL_BUFFER( "PQRSTUVWXYZ(){} ", MPTEST.BUFFER_AREA_4 );
71
72      MPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME(  '1', '1', '1', ' ' );
73      MPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME(  '2', '2', '2', ' ' );
74
75      MPTEST.QUEUE_NAME( 1 ) := RTEMS.BUILD_NAME(  'M', 'S', 'G', ' ' );
76
77      if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 1 then
78
79         TEXT_IO.PUT_LINE( "Creating Message Queue (Global)" );
80         RTEMS.MESSAGE_QUEUE_CREATE(
81            MPTEST.QUEUE_NAME( 1 ),
82            3,
83            RTEMS.GLOBAL + RTEMS.LIMIT,
84            MPTEST.QUEUE_ID( 1 ),
85            STATUS
86         );
87         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_CREATE" );
88
89      end if;
90
91      TEXT_IO.PUT_LINE( "Creating Test_task (local)" );
92      RTEMS.TASK_CREATE(
93         MPTEST.TASK_NAME( MPTEST.MULTIPROCESSING_CONFIGURATION.NODE ),
94         MPTEST.MULTIPROCESSING_CONFIGURATION.NODE,
95         2048,
96         RTEMS.TIMESLICE,
97         RTEMS.DEFAULT_ATTRIBUTES,
98         MPTEST.TASK_ID( 1 ),
99         STATUS
100      );
101      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE" );
102
103      TEXT_IO.PUT_LINE( "Starting Test_task (local)" );
104      RTEMS.TASK_START(
105         MPTEST.TASK_ID( 1 ),
106         MPTEST.TEST_TASK'ACCESS,
107         0,
108         STATUS
109      );
110      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START" );
111
112      TEXT_IO.PUT_LINE( "Deleting initialization task" );
113      RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
114      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
115
116   end INIT;
117
118--PAGE
119--
120--  SEND_MESSAGES
121--
122
123   procedure SEND_MESSAGES is
124      BROADCAST_COUNT     : RTEMS.UNSIGNED32;
125      STATUS              : RTEMS.STATUS_CODES;
126   begin
127
128      TEXT_IO.PUT( "message_queue_send : " );
129      MPTEST.PUT_BUFFER( MPTEST.BUFFER_AREA_1 );
130      TEXT_IO.NEW_LINE;
131
132      RTEMS.MESSAGE_QUEUE_SEND(
133         MPTEST.QUEUE_ID( 1 ),
134         MPTEST.BUFFER_1,
135         STATUS
136      );
137      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
138
139      TEXT_IO.PUT_LINE( "Delaying for a second" );
140      RTEMS.TASK_WAKE_AFTER(
141         1 * TEST_SUPPORT.TICKS_PER_SECOND,
142         STATUS
143      );
144      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
145
146      TEXT_IO.PUT( "message_queue_urgent : " );
147      MPTEST.PUT_BUFFER( MPTEST.BUFFER_AREA_2 );
148      TEXT_IO.NEW_LINE;
149
150      RTEMS.MESSAGE_QUEUE_URGENT(
151         MPTEST.QUEUE_ID( 1 ),
152         MPTEST.BUFFER_2,
153         STATUS
154      );
155      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_URGENT" );
156
157      TEXT_IO.PUT_LINE( "Delaying for a second" );
158      RTEMS.TASK_WAKE_AFTER(
159         1 * TEST_SUPPORT.TICKS_PER_SECOND,
160         STATUS
161      );
162      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
163
164      TEXT_IO.PUT( "message_queue_broadcast : " );
165      MPTEST.PUT_BUFFER( MPTEST.BUFFER_AREA_3 );
166      TEXT_IO.NEW_LINE;
167
168      RTEMS.MESSAGE_QUEUE_BROADCAST(
169         MPTEST.QUEUE_ID( 1 ),
170         MPTEST.BUFFER_3,
171         BROADCAST_COUNT,
172         STATUS
173      );
174      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_BROADCAST" );
175
176      TEXT_IO.PUT_LINE( "Delaying for a second" );
177      RTEMS.TASK_WAKE_AFTER(
178         1 * TEST_SUPPORT.TICKS_PER_SECOND,
179         STATUS
180      );
181      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
182
183   end SEND_MESSAGES;
184
185--PAGE
186--
187--  RECEIVE_MESSAGES
188--
189
190   procedure RECEIVE_MESSAGES is
191      INDEX               : RTEMS.UNSIGNED32;
192      STATUS              : RTEMS.STATUS_CODES;
193   begin
194
195      for INDEX in 1 .. 3
196      loop
197
198         TEXT_IO.PUT_LINE( "Receiving message ..." );
199         RTEMS.MESSAGE_QUEUE_RECEIVE(
200            MPTEST.QUEUE_ID( 1 ),
201            MPTEST.RECEIVE_BUFFER,
202            RTEMS.DEFAULT_OPTIONS,
203            RTEMS.NO_TIMEOUT,
204            STATUS
205         );
206         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_RECEIVE" );
207
208         TEXT_IO.PUT( "Received : " );
209         MPTEST.PUT_BUFFER( MPTEST.RECEIVE_BUFFER_AREA );
210         TEXT_IO.NEW_LINE;
211
212      end loop;
213
214      TEXT_IO.PUT_LINE( "Receiver delaying for a second" );
215
216      RTEMS.TASK_WAKE_AFTER( 1 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
217      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
218
219   end RECEIVE_MESSAGES;
220
221--PAGE
222--
223--  FILL_BUFFER
224--
225
226--
227-- Depends on tricks to make the copy work.
228--
229
230   procedure FILL_BUFFER (
231      SOURCE : in     STRING;
232      BUFFER :    out RTEMS.BUFFER
233   ) is
234      SOURCE_BUFFER : RTEMS.BUFFER_POINTER;
235   begin
236
237      SOURCE_BUFFER := RTEMS.TO_BUFFER_POINTER(
238                          SOURCE( SOURCE'FIRST )'ADDRESS
239                       );
240
241      BUFFER.FIELD1 := SOURCE_BUFFER.FIELD1;
242      BUFFER.FIELD2 := SOURCE_BUFFER.FIELD2;
243      BUFFER.FIELD3 := SOURCE_BUFFER.FIELD3;
244      BUFFER.FIELD4 := SOURCE_BUFFER.FIELD4;
245
246   end FILL_BUFFER;
247
248--PAGE
249--
250--  PUT_BUFFER
251--
252
253--
254-- Depends on tricks to make the output work.
255--
256
257   procedure PUT_BUFFER (
258      BUFFER : in     RTEMS.BUFFER
259   ) is
260   begin
261
262      TEST_SUPPORT.PUT_NAME( BUFFER.FIELD1, FALSE );
263      TEST_SUPPORT.PUT_NAME( BUFFER.FIELD2, FALSE );
264      TEST_SUPPORT.PUT_NAME( BUFFER.FIELD3, FALSE );
265      TEST_SUPPORT.PUT_NAME( BUFFER.FIELD4, FALSE );
266
267   end PUT_BUFFER;
268
269--PAGE
270--
271--  TEST_TASK
272--
273
274   procedure TEST_TASK (
275      ARGUMENT : in     RTEMS.TASK_ARGUMENT
276   ) is
277      COUNT   : RTEMS.UNSIGNED32;
278      STATUS  : RTEMS.STATUS_CODES;
279   begin
280
281      RTEMS.TASK_WAKE_AFTER( 1 * TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
282      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
283
284      TEXT_IO.PUT_LINE( "Getting QID of message queue" );
285
286      loop
287
288         RTEMS.MESSAGE_QUEUE_IDENT(
289            MPTEST.QUEUE_NAME( 1 ),
290            RTEMS.SEARCH_ALL_NODES,
291            MPTEST.QUEUE_ID( 1 ),
292            STATUS
293         );
294
295         exit when RTEMS.IS_STATUS_SUCCESSFUL( STATUS );
296
297      end loop;
298
299      if MPTEST.MULTIPROCESSING_CONFIGURATION.NODE = 2 then
300
301         RTEMS.MESSAGE_QUEUE_DELETE( MPTEST.QUEUE_ID( 1 ), STATUS );
302
303         TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
304            STATUS,
305            RTEMS.ILLEGAL_ON_REMOTE_OBJECT,
306            "MESSAGE_QUEUE_DELETE"
307         );
308
309         TEXT_IO.PUT_LINE(
310         "message_queue_delete correctly returned ILLEGAL_ON_REMOTE_OBJECT"
311         );
312
313         MPTEST.SEND_MESSAGES;
314
315         MPTEST.RECEIVE_MESSAGES;
316
317         TEXT_IO.PUT_LINE( "Flushing remote empty queue" );
318         RTEMS.MESSAGE_QUEUE_FLUSH( MPTEST.QUEUE_ID( 1 ), COUNT, STATUS );
319         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_FLUSH" );
320         UNSIGNED32_IO.PUT( COUNT, WIDTH => 1 );
321         TEXT_IO.PUT_LINE(
322            " messages were flushed from remote empty queue"
323         );
324
325         TEXT_IO.PUT_LINE(
326            "Send messages to be flushed from remote queue"
327         );
328         RTEMS.MESSAGE_QUEUE_SEND(
329            MPTEST.QUEUE_ID( 1 ),
330            MPTEST.BUFFER_1,
331            STATUS
332         );
333         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_SEND" );
334
335         TEXT_IO.PUT_LINE( "Flushing remote queue" );
336         RTEMS.MESSAGE_QUEUE_FLUSH( MPTEST.QUEUE_ID( 1 ), COUNT, STATUS );
337         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_FLUSH" );
338         UNSIGNED32_IO.PUT( COUNT, WIDTH => 1 );
339         TEXT_IO.PUT_LINE(
340            " messages were flushed from the remote queue"
341         );
342
343         TEXT_IO.PUT_LINE( "Waiting for message queue to be deleted" );
344         RTEMS.MESSAGE_QUEUE_RECEIVE(
345            MPTEST.QUEUE_ID( 1 ),
346            MPTEST.RECEIVE_BUFFER,
347            RTEMS.DEFAULT_OPTIONS,
348            RTEMS.NO_TIMEOUT,
349            STATUS
350         );
351         TEST_SUPPORT.FATAL_DIRECTIVE_STATUS(
352            STATUS,
353            RTEMS.OBJECT_WAS_DELETED,
354            "MESSAGE_QUEUE_FLUSH"
355         );
356
357      else
358
359         MPTEST.RECEIVE_MESSAGES;
360
361         MPTEST.SEND_MESSAGES;
362
363         RTEMS.TASK_WAKE_AFTER(
364            5 * TEST_SUPPORT.TICKS_PER_SECOND,
365            STATUS
366         );
367         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
368
369         RTEMS.MESSAGE_QUEUE_DELETE( MPTEST.QUEUE_ID( 1 ), STATUS );
370         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "MESSAGE_QUEUE_DELETE" );
371
372      end if;
373
374      TEXT_IO.PUT_LINE( "*** END OF TEST 9 ***" );
375
376      RTEMS.SHUTDOWN_EXECUTIVE( 0 );
377
378   end TEST_TASK;
379
380end MPTEST;
Note: See TracBrowser for help on using the repository browser.