OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c9/] [c93008a.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C93008A.ADA
2
 
3
--                             Grant of Unlimited Rights
4
--
5
--     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6
--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained 
7
--     unlimited rights in the software and documentation contained herein.
8
--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making 
9
--     this public release, the Government intends to confer upon all 
10
--     recipients unlimited rights  equal to those held by the Government.  
11
--     These rights include rights to use, duplicate, release or disclose the 
12
--     released technical data and computer software in whole or in part, in 
13
--     any manner and for any purpose whatsoever, and to have or permit others 
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
18
--     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19
--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 
20
--     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21
--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 
22
--     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23
--     PARTICULAR PURPOSE OF SAID MATERIAL.
24
--*
25
-- CHECK THAT FOR A TASK CREATED BY AN OBJECT DECLARATION, EXECUTION 
26
-- DOES NOT PROCEED IN PARALLEL WITH ACTIVATION.
27
 
28
-- R.WILLIAMS 8/20/86
29
 
30
with Impdef;
31
WITH REPORT; USE REPORT;
32
PROCEDURE C93008A IS
33
 
34
     SUBTYPE ARG IS NATURAL RANGE 0..9;
35
     SPYNUMB : NATURAL := 0;
36
 
37
     TASK T IS
38
          ENTRY FINIT_POS (DIGT : IN ARG);
39
     END T;
40
 
41
     TASK BODY T IS
42
     BEGIN
43
          LOOP
44
               SELECT
45
                    ACCEPT FINIT_POS (DIGT : IN ARG) DO
46
                         SPYNUMB := 10*SPYNUMB+DIGT;
47
                    END FINIT_POS;
48
               OR
49
                    TERMINATE;
50
               END SELECT;
51
          END LOOP;
52
     END T;
53
 
54
BEGIN
55
 
56
     TEST ("C93008A", "CHECK THAT EXECUTION DOES NOT PROCEED IN  " &
57
                      "PARALLEL WITH ACTIVATION OF A TASK CREATED " &
58
                      "BY AN OBJECT DECLARATION");
59
 
60
BLOCK:
61
     DECLARE
62
 
63
          TASK TYPE TT1;
64
 
65
          TASK TT2;
66
 
67
          T1 : TT1;
68
 
69
          TASK BODY TT1 IS
70
               PACKAGE DUMMY IS
71
               END DUMMY;
72
 
73
               PACKAGE BODY DUMMY IS
74
               BEGIN
75
                    DELAY 2.0 * Impdef.One_Second;
76
                    T.FINIT_POS(1);
77
               END DUMMY;
78
          BEGIN
79
               NULL;
80
          END TT1;
81
 
82
          TASK BODY TT2 IS
83
               PACKAGE DUMMY IS
84
               END DUMMY;
85
 
86
               PACKAGE BODY DUMMY IS
87
               BEGIN
88
                    DELAY 2.0 * Impdef.One_Second;
89
                    T.FINIT_POS(2);
90
               END DUMMY;
91
          BEGIN
92
               NULL;
93
          END TT2;
94
 
95
 
96
     BEGIN               -- TASKS ACTIVATED NOW.
97
 
98
          IF SPYNUMB = 12 OR SPYNUMB = 21 THEN
99
               NULL;
100
          ELSE
101
               FAILED ("TASKS NOT ACTIVATED PROPERLY - SPYNUMB HAS " &
102
                       "ACTUAL VALUE OF: " & INTEGER'IMAGE(SPYNUMB));
103
          END IF;
104
     END BLOCK;
105
 
106
     RESULT;
107
 
108
END C93008A;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.