source: rtems/c/src/ada-tests/sptests/sp19/sptest.adp @ f6bcc8f

Last change on this file since f6bcc8f was f6bcc8f, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 4, 2003 at 1:25:16 PM

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

  • 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.adp, 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/init.c, 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: Removed incorrect statement about copyright assignment.
  • Property mode set to 100644
File size: 10.7 KB
Line 
1--
2--  SPTEST / BODY
3--
4--  DESCRIPTION:
5--
6--  This package is the implementation of Test 19 of the RTEMS
7--  Single Processor Test Suite.
8--
9--  DEPENDENCIES:
10--
11-- 
12--
13--  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
14--  On-Line Applications Research Corporation (OAR).
15--
16--  This material may be reproduced by or for the U.S. Government pursuant
17--  to the copyright license under the clause at DFARS 252.227-7013.  This
18--  notice must appear in all copies of this file and its derivatives.
19--
20--  sptest.adp,v 1.3 1995/07/12 19:42:20 joel Exp
21--
22
23with INTERFACES; use INTERFACES;
24with FLOAT_IO;
25with RTEMS;
26with TEST_SUPPORT;
27with TEXT_IO;
28with UNSIGNED32_IO;
29
30include(../../support/fp.inc)
31include(../../support/integer.inc)
32
33package body SPTEST is
34
35--PAGE
36--
37--  INIT
38--
39
40   procedure INIT (
41      ARGUMENT : in     RTEMS.TASK_ARGUMENT
42   ) is
43      STATUS : RTEMS.STATUS_CODES;
44   begin
45
46      TEXT_IO.NEW_LINE( 2 );
47      TEXT_IO.PUT_LINE( "*** TEST 19 ***" );
48
49      SPTEST.TASK_NAME( 1 ) := RTEMS.BUILD_NAME(  'T', 'A', '1', ' ' );
50      SPTEST.TASK_NAME( 2 ) := RTEMS.BUILD_NAME(  'T', 'A', '2', ' ' );
51      SPTEST.TASK_NAME( 3 ) := RTEMS.BUILD_NAME(  'T', 'A', '3', ' ' );
52      SPTEST.TASK_NAME( 4 ) := RTEMS.BUILD_NAME(  'T', 'A', '4', ' ' );
53      SPTEST.TASK_NAME( 5 ) := RTEMS.BUILD_NAME(  'T', 'A', '5', ' ' );
54      SPTEST.TASK_NAME( 6 ) := RTEMS.BUILD_NAME(  'F', 'P', '1', ' ' );
55
56      RTEMS.TASK_CREATE(
57         SPTEST.TASK_NAME( 1 ),
58         2,
59         2048,
60         RTEMS.DEFAULT_MODES,
61         RTEMS.FLOATING_POINT,
62         SPTEST.TASK_ID( 1 ),
63         STATUS
64      );
65      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA1" );
66
67      RTEMS.TASK_CREATE(
68         SPTEST.TASK_NAME( 2 ),
69         2,
70         2048,
71         RTEMS.DEFAULT_MODES,
72         RTEMS.DEFAULT_ATTRIBUTES,
73         SPTEST.TASK_ID( 2 ),
74         STATUS
75      );
76      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA2" );
77
78      RTEMS.TASK_CREATE(
79         SPTEST.TASK_NAME( 3 ),
80         2,
81         2048,
82         RTEMS.DEFAULT_MODES,
83         RTEMS.DEFAULT_ATTRIBUTES,
84         SPTEST.TASK_ID( 3 ),
85         STATUS
86      );
87      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA3" );
88
89      RTEMS.TASK_CREATE(
90         SPTEST.TASK_NAME( 4 ),
91         2,
92         2048,
93         RTEMS.DEFAULT_MODES,
94         RTEMS.FLOATING_POINT,
95         SPTEST.TASK_ID( 4 ),
96         STATUS
97      );
98      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA4" );
99
100      RTEMS.TASK_CREATE(
101         SPTEST.TASK_NAME( 5 ),
102         2,
103         2048,
104         RTEMS.DEFAULT_MODES,
105         RTEMS.FLOATING_POINT,
106         SPTEST.TASK_ID( 5 ),
107         STATUS
108      );
109      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF TA5" );
110
111      RTEMS.TASK_CREATE(
112         SPTEST.TASK_NAME( 6 ),
113         1,
114         2048,
115         RTEMS.DEFAULT_MODES,
116         RTEMS.FLOATING_POINT,
117         SPTEST.TASK_ID( 6 ),
118         STATUS
119      );
120      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF FP1" );
121
122      RTEMS.TASK_START(
123         SPTEST.TASK_ID( 6 ),
124         SPTEST.FIRST_FP_TASK'ACCESS,
125         0,
126         STATUS
127      );
128      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF FP1" );
129
130      RTEMS.TASK_START(
131         SPTEST.TASK_ID( 1 ),
132         SPTEST.TASK_1'ACCESS,
133         0,
134         STATUS
135      );
136      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA1" );
137
138      RTEMS.TASK_START(
139         SPTEST.TASK_ID( 2 ),
140         SPTEST.TASK_1'ACCESS,
141         0,
142         STATUS
143      );
144      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA2" );
145
146      RTEMS.TASK_START(
147         SPTEST.TASK_ID( 3 ),
148         SPTEST.TASK_1'ACCESS,
149         0,
150         STATUS
151      );
152      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA3" );
153
154      RTEMS.TASK_START(
155         SPTEST.TASK_ID( 4 ),
156         SPTEST.FP_TASK'ACCESS,
157         0,
158         STATUS
159      );
160      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA4" );
161
162      RTEMS.TASK_START(
163         SPTEST.TASK_ID( 5 ),
164         SPTEST.FP_TASK'ACCESS,
165         0,
166         STATUS
167      );
168      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF TA5" );
169
170      --
171      --  Load "task dependent factors" in the context areas
172      --
173
174      SPTEST.FP_FACTORS( 0 ) :=    0.0;
175      SPTEST.FP_FACTORS( 1 ) := 1000.1;
176      SPTEST.FP_FACTORS( 2 ) := 2000.2;
177      SPTEST.FP_FACTORS( 3 ) := 3000.3;
178      SPTEST.FP_FACTORS( 4 ) := 4000.4;
179      SPTEST.FP_FACTORS( 5 ) := 5000.5;
180      SPTEST.FP_FACTORS( 6 ) := 6000.6;
181      SPTEST.FP_FACTORS( 7 ) := 7000.7;
182      SPTEST.FP_FACTORS( 8 ) := 8000.8;
183      SPTEST.FP_FACTORS( 9 ) := 9000.9;
184
185      SPTEST.INTEGER_FACTORS( 0 ) := 16#0000#;
186      SPTEST.INTEGER_FACTORS( 1 ) := 16#1000#;
187      SPTEST.INTEGER_FACTORS( 2 ) := 16#2000#;
188      SPTEST.INTEGER_FACTORS( 3 ) := 16#3000#;
189      SPTEST.INTEGER_FACTORS( 4 ) := 16#4000#;
190      SPTEST.INTEGER_FACTORS( 5 ) := 16#5000#;
191      SPTEST.INTEGER_FACTORS( 6 ) := 16#6000#;
192      SPTEST.INTEGER_FACTORS( 7 ) := 16#7000#;
193      SPTEST.INTEGER_FACTORS( 8 ) := 16#8000#;
194      SPTEST.INTEGER_FACTORS( 9 ) := 16#9000#;
195
196      RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
197      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
198
199   end INIT;
200
201--PAGE
202--
203--  FIRST_FP_TASK
204--
205
206   procedure FIRST_FP_TASK (
207      ARGUMENT : in     RTEMS.TASK_ARGUMENT
208   ) is
209      STATUS     : RTEMS.STATUS_CODES;
210      TID        : RTEMS.ID;
211      TIME       : RTEMS.TIME_OF_DAY;
212      TASK_INDEX : RTEMS.UNSIGNED32;
213      INTEGER_DECLARE;
214      FP_DECLARE;
215   begin
216
217      RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
218      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
219
220      TASK_INDEX := TEST_SUPPORT.TASK_NUMBER( TID );
221   
222      INTEGER_LOAD( INTEGER_FACTORS( TASK_INDEX ) );
223      FP_LOAD( FP_FACTORS( TASK_INDEX ) );
224
225      TEST_SUPPORT.PUT_NAME( SPTEST.TASK_NAME( TASK_INDEX ), FALSE );
226      TEXT_IO.PUT( " - integer base = (" );
227      UNSIGNED32_IO.PUT( INTEGER_FACTORS( TASK_INDEX ), BASE => 16 );
228      TEXT_IO.PUT_LINE( ")" );
229
230      --
231      --  C implementation prints NA if no hardware FP support.
232      --
233
234      TEST_SUPPORT.PUT_NAME(
235         SPTEST.TASK_NAME( TEST_SUPPORT.TASK_NUMBER( TID ) ),
236         FALSE
237      );
238      TEXT_IO.PUT( " - float base = (" );
239      FLOAT_IO.PUT( FP_FACTORS( TASK_INDEX ) );
240      TEXT_IO.PUT_LINE( ")" );
241
242      if ARGUMENT = 0 then
243         RTEMS.TASK_RESTART(
244            RTEMS.SELF,
245            1,
246            STATUS
247         );
248         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_RESTART OF SELF" );
249      else
250         TIME := ( 1988, 12, 31, 9, 0, 0, 0 );
251         RTEMS.CLOCK_SET( TIME, STATUS );
252         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_SET" );
253
254         RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
255         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF SELF" );
256      end if;
257
258   end FIRST_FP_TASK;
259
260--PAGE
261--
262--  FP_TASK
263--
264
265   procedure FP_TASK (
266      ARGUMENT : in     RTEMS.TASK_ARGUMENT
267   ) is
268      STATUS     : RTEMS.STATUS_CODES;
269      TID        : RTEMS.ID;
270      TIME       : RTEMS.TIME_OF_DAY;
271      TASK_INDEX : RTEMS.UNSIGNED32;
272      INTEGER_DECLARE;
273      FP_DECLARE;
274   begin
275
276      RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
277      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
278   
279      TASK_INDEX := TEST_SUPPORT.TASK_NUMBER( TID );
280 
281      INTEGER_LOAD( INTEGER_FACTORS( TASK_INDEX ) );
282      FP_LOAD( FP_FACTORS( TASK_INDEX ) );
283 
284      TEST_SUPPORT.PUT_NAME(
285         SPTEST.TASK_NAME( TEST_SUPPORT.TASK_NUMBER( TID ) ),
286         FALSE
287      );
288      TEXT_IO.PUT( " - integer base = (" );
289      UNSIGNED32_IO.PUT( INTEGER_FACTORS( TASK_INDEX ), BASE => 16 );
290      TEXT_IO.PUT_LINE( ")" );
291 
292      --
293      --  C implementation prints NA if no hardware FP support.
294      --
295 
296      TEST_SUPPORT.PUT_NAME(
297         SPTEST.TASK_NAME( TEST_SUPPORT.TASK_NUMBER( TID ) ),
298         FALSE
299      );
300      TEXT_IO.PUT( " - float base = (" );
301      FLOAT_IO.PUT( FP_FACTORS( TASK_INDEX ) );
302      TEXT_IO.PUT_LINE( ")" );
303
304      loop
305
306         RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
307         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
308
309         if TIME.SECOND >= 16 then
310
311            if TEST_SUPPORT.TASK_NUMBER( TID ) = 4 then
312               TEXT_IO.PUT_LINE( "TA4 - task_delete - self" );
313               RTEMS.TASK_DELETE( RTEMS.SELF, STATUS );
314               TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA4" );
315            end if;
316     
317            TEXT_IO.PUT_LINE( "TA5 - task_delete - TA3" );
318            RTEMS.TASK_DELETE( SPTEST.TASK_ID( 3 ), STATUS );
319            TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_DELETE OF TA3" );
320 
321            TEXT_IO.PUT_LINE( "*** END OF TEST 19 ***" );
322            RTEMS.SHUTDOWN_EXECUTIVE( 0 );
323         end if;
324
325         TEST_SUPPORT.PUT_NAME(
326            SPTEST.TASK_NAME( TEST_SUPPORT.TASK_NUMBER( TID ) ),
327            FALSE
328         );
329
330         TEST_SUPPORT.PRINT_TIME( " - clock_get - ", TIME, "" );
331         TEXT_IO.NEW_LINE;
332
333         INTEGER_CHECK( INTEGER_FACTORS( TASK_INDEX ) );
334         FP_CHECK( FP_FACTORS( TASK_INDEX ) );
335 
336         RTEMS.TASK_WAKE_AFTER( TEST_SUPPORT.TICKS_PER_SECOND, STATUS );
337         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
338         
339      end loop;
340   
341   end FP_TASK;
342
343--PAGE
344--
345--  TASK_1
346--
347
348   procedure TASK_1 (
349      ARGUMENT : in     RTEMS.TASK_ARGUMENT
350   ) is
351      STATUS     : RTEMS.STATUS_CODES;
352      TID        : RTEMS.ID;
353      TIME       : RTEMS.TIME_OF_DAY;
354      TASK_INDEX : RTEMS.UNSIGNED32;
355      INTEGER_DECLARE;
356   begin
357
358      RTEMS.TASK_IDENT( RTEMS.SELF, RTEMS.SEARCH_ALL_NODES, TID, STATUS );
359      TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_IDENT OF SELF" );
360   
361      TASK_INDEX := TEST_SUPPORT.TASK_NUMBER( TID );
362 
363      INTEGER_LOAD( INTEGER_FACTORS( TASK_INDEX ) );
364 
365      TEST_SUPPORT.PUT_NAME(
366         SPTEST.TASK_NAME( TEST_SUPPORT.TASK_NUMBER( TID ) ),
367         FALSE
368      );
369      TEXT_IO.PUT( " - integer base = (" );
370      UNSIGNED32_IO.PUT( INTEGER_FACTORS( TASK_INDEX ), BASE => 16 );
371      TEXT_IO.PUT_LINE( ")" );
372 
373      loop
374
375         RTEMS.CLOCK_GET( RTEMS.CLOCK_GET_TOD, TIME'ADDRESS, STATUS );
376         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "CLOCK_GET" );
377
378         TEST_SUPPORT.PUT_NAME(
379            SPTEST.TASK_NAME( TEST_SUPPORT.TASK_NUMBER( TID ) ),
380            FALSE
381         );
382
383         TEST_SUPPORT.PRINT_TIME( " - clock_get - ", TIME, "" );
384         TEXT_IO.NEW_LINE;
385
386         INTEGER_CHECK( INTEGER_FACTORS( TASK_INDEX ) );
387
388         RTEMS.TASK_WAKE_AFTER(
389            TEST_SUPPORT.TASK_NUMBER( TID ) * 5 *
390              TEST_SUPPORT.TICKS_PER_SECOND,
391            STATUS
392         );
393         TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_WAKE_AFTER" );
394         
395      end loop;
396   
397   end TASK_1;
398
399end SPTEST;
Note: See TracBrowser for help on using the repository browser.