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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C97203B.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 A CONDITIONAL_ENTRY_CALL CAN APPEAR IN PLACES WHERE A
26
--     SELECTIVE_WAIT  CANNOT.
27
 
28
-- PART 2: PROCEDURE BODY EMBEDDED IN TASK BODY.
29
 
30
 
31
-- RM 4/09/1982
32
 
33
 
34
WITH REPORT;
35
USE REPORT;
36
PROCEDURE  C97203B  IS
37
 
38
 
39
BEGIN
40
 
41
 
42
     TEST ( "C97203B" , "CHECK THAT A  CONDITIONAL_ENTRY_CALL  CAN" &
43
                        " APPEAR WHERE A  SELECTIVE_WAIT  CANNOT" );
44
 
45
 
46
     -------------------------------------------------------------------
47
 
48
 
49
     DECLARE
50
 
51
 
52
          TASK  TT  IS
53
               ENTRY  A ( AUTHORIZED : IN BOOLEAN );
54
          END  TT ;
55
 
56
 
57
          TASK BODY  TT  IS
58
 
59
 
60
               PROCEDURE  WITHIN_TASK_BODY ;
61
 
62
 
63
               PROCEDURE  WITHIN_TASK_BODY  IS
64
               BEGIN
65
 
66
                    SELECT  -- NOT A SELECTIVE_WAIT
67
                         A ( FALSE ) ;  -- CALLING (OWN) ENTRY
68
                    ELSE
69
                         COMMENT( "ALTERNATIVE BRANCH TAKEN" );
70
                    END SELECT;
71
 
72
               END  WITHIN_TASK_BODY ;
73
 
74
 
75
          BEGIN
76
 
77
 
78
               -- CALL THE INNER PROC. TO FORCE EXEC. OF COND_E_CALL
79
               WITHIN_TASK_BODY ;
80
 
81
 
82
               ACCEPT  A ( AUTHORIZED : IN BOOLEAN )  DO
83
 
84
                    IF  AUTHORIZED  THEN
85
                         COMMENT(  "AUTHORIZED ENTRY_CALL" );
86
                    ELSE
87
                         FAILED( "UNAUTHORIZED ENTRY_CALL" );
88
                    END IF;
89
 
90
               END  A ;
91
 
92
          END  TT ;
93
 
94
 
95
          PROCEDURE  OUTSIDE_TASK_BODY  IS
96
          BEGIN
97
 
98
               SELECT  -- NOT A SELECTIVE_WAIT
99
                    TT.A ( FALSE ) ;  -- UNBORN
100
               ELSE
101
                    COMMENT( "(OUT:) ALTERNATIVE BRANCH TAKEN" );
102
               END SELECT;
103
 
104
          END  OUTSIDE_TASK_BODY ;
105
 
106
 
107
          PACKAGE       CREATE_OPPORTUNITY_TO_CALL           IS END;
108
          PACKAGE BODY  CREATE_OPPORTUNITY_TO_CALL  IS
109
          BEGIN
110
               -- CALL THE OTHER PROC. TO FORCE EXEC. OF COND_E_CALL
111
               OUTSIDE_TASK_BODY ;
112
          END  CREATE_OPPORTUNITY_TO_CALL ;
113
 
114
 
115
     BEGIN
116
 
117
          TT.A ( TRUE );
118
 
119
     EXCEPTION
120
 
121
          WHEN  TASKING_ERROR  =>
122
               FAILED( "TASKING ERROR" );
123
 
124
     END  ;
125
 
126
     -------------------------------------------------------------------
127
 
128
     RESULT ;
129
 
130
 
131
END  C97203B ;

powered by: WebSVN 2.1.0

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