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/] [c93008b.ada] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C93008B.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 AFTER CREATION OF A TASK OBJECT BY AN ALLOCATOR, ANY
26
-- OPERATION INVOLVING THE RESULT DELIVERED BY THE ALLOCATOR IS
27
-- EXECUTED ONLY AFTER THE ACTIVATION OF THE TASK HAS COMPLETED.
28
 
29
-- WEI  3/ 4/82
30
-- TBN 12/20/85     RENAMED FROM C930AJA-B.ADA. ADDED DELAY STATEMENT
31
--                  DURING TASK ACTIVATION.
32
-- RJW 4/11/86      ADDED PACKAGE DUMMY.
33
 
34
with Impdef;
35
WITH REPORT; USE REPORT;
36
PROCEDURE C93008B IS
37
 
38
     SUBTYPE ARG IS NATURAL RANGE 0..9;
39
     SPYNUMB : NATURAL := 0;
40
 
41
     FUNCTION FINIT_POS (DIGT: IN ARG) RETURN NATURAL IS
42
     BEGIN
43
          SPYNUMB := 10*SPYNUMB+DIGT;
44
          RETURN DIGT;
45
     END FINIT_POS;
46
 
47
BEGIN
48
 
49
     TEST ("C93008B", "USE OF RESULT AFTER CREATION OF " &
50
                      "A TASK BY ALLOCATOR");
51
 
52
BLOCK:
53
     DECLARE
54
 
55
          TASK TYPE TT1;
56
 
57
          TYPE ATT1 IS ACCESS TT1;
58
          TYPE ARRAY_ATT1 IS ARRAY (NATURAL RANGE 2 .. 3) OF ATT1;
59
          MY_ARRAY : ARRAY_ATT1;
60
          POINTER_TT1 : ATT1;
61
 
62
          TASK BODY TT1 IS
63
               PACKAGE DUMMY IS
64
               END DUMMY;
65
 
66
               PACKAGE BODY DUMMY IS
67
               BEGIN
68
                    DELAY 2.0 * Impdef.One_Second;
69
                    DECLARE
70
                         IDUMMY1 : NATURAL := FINIT_POS (1);
71
                    BEGIN
72
                         NULL;
73
                    END;
74
               END DUMMY;
75
          BEGIN
76
               NULL;
77
          END TT1;
78
 
79
     BEGIN
80
 
81
          MY_ARRAY := (2 => NEW TT1, 3 => NULL);  -- TASK ACTIVATED NOW.
82
          POINTER_TT1 := MY_ARRAY (FINIT_POS (2));
83
 
84
          MY_ARRAY (FINIT_POS (3)) := POINTER_TT1;
85
 
86
          IF SPYNUMB /= 123 THEN
87
               IF SPYNUMB = 132 OR SPYNUMB = 13 OR
88
                  SPYNUMB = 12  OR SPYNUMB = 1  OR
89
                  SPYNUMB = 0
90
               THEN
91
                    FAILED ("TASK ACTIVATION RIGHT IN TIME, " &
92
                            "BUT OTHER ERROR");
93
               ELSE
94
                    FAILED ("RESULT OF ALLOCATOR ACCESSED BEFORE " &
95
                            "TASK ACTIVATION HAS COMPLETED");
96
               END IF;
97
               COMMENT ("ACTUAL ORDER WAS:" & INTEGER'IMAGE(SPYNUMB));
98
          END IF;
99
     END BLOCK;
100
 
101
     RESULT;
102
 
103
END C93008B;

powered by: WebSVN 2.1.0

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