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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C97201H.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 RENDEZVOUS REQUESTED BY A CONDITIONAL_ENTRY_CALL
26
--     IS PERFORMED ONLY IF IMMEDIATELY POSSIBLE.
27
 
28
-- CASE  H:  THE CORRESPONDING ACCEPT_STATEMENT IS CLOSED
29
--     AND THIS FACT IS NOT STATICALLY DETERMINABLE.
30
 
31
 
32
-- RM 4/22/82
33
 
34
 
35
WITH REPORT; USE REPORT;
36
PROCEDURE C97201H IS
37
 
38
     ELSE_BRANCH_TAKEN    :  BOOLEAN  :=  FALSE ;
39
     RENDEZVOUS_OCCURRED  :  BOOLEAN  :=  FALSE ;
40
     QUEUE_NOT_EMPTY      :  BOOLEAN  :=  FALSE ;
41
     X                    :  INTEGER  :=  17 ;
42
 
43
BEGIN
44
 
45
 
46
     TEST ("C97201H", "CHECK THAT NO RENDEZVOUS REQUESTED BY"      &
47
                      " A CONDITIONAL_ENTRY_CALL CAN EVER OCCUR"   &
48
                      " IF THE CORRESPONDING ACCEPT_STATEMENT IS"  &
49
                      " CLOSED"                                    );
50
 
51
 
52
     -------------------------------------------------------------------
53
 
54
 
55
     DECLARE
56
 
57
 
58
          TASK  T  IS
59
               ENTRY  DO_IT_NOW_ORELSE( DID_YOU_DO_IT : IN OUT BOOLEAN);
60
               ENTRY  KEEP_ALIVE ;
61
          END  T ;
62
 
63
 
64
          TASK BODY  T  IS
65
          BEGIN
66
 
67
               IF  DO_IT_NOW_ORELSE'COUNT /= 0  THEN
68
                    QUEUE_NOT_EMPTY := TRUE ;
69
               END IF;
70
 
71
 
72
               SELECT
73
                    WHEN  3 = IDENT_INT(5)  =>
74
                         ACCEPT  DO_IT_NOW_ORELSE
75
                                      ( DID_YOU_DO_IT : IN OUT BOOLEAN)
76
                         DO
77
                              DID_YOU_DO_IT := TRUE ;
78
                         END;
79
               OR
80
                         ACCEPT  KEEP_ALIVE ; -- TO PREVENT SELECT_ERROR
81
               END SELECT;
82
 
83
 
84
               IF  DO_IT_NOW_ORELSE'COUNT /= 0  THEN
85
                    QUEUE_NOT_EMPTY := TRUE ;
86
               END IF;
87
 
88
 
89
          END  T ;
90
 
91
 
92
     BEGIN
93
 
94
          COMMENT( "PERMANENTLY CLOSED" );
95
 
96
          SELECT
97
               T.DO_IT_NOW_ORELSE( RENDEZVOUS_OCCURRED );
98
          ELSE              -- (I.E. CALLER ADOPTS A NO-WAIT POLICY)
99
                            --      THEREFORE THIS BRANCH MUST BE CHOSEN
100
               ELSE_BRANCH_TAKEN := TRUE ;
101
               COMMENT( "ELSE_BRANCH  TAKEN" );
102
          END SELECT;
103
 
104
          T.KEEP_ALIVE ;    -- THIS ALSO UPDATES THE NONLOCALS
105
 
106
     END;   -- END OF BLOCK CONTAINING THE ENTRY CALL
107
 
108
 
109
     -------------------------------------------------------------------
110
 
111
 
112
     -- BY NOW, THE TASK IS TERMINATED
113
 
114
     IF  RENDEZVOUS_OCCURRED
115
     THEN
116
          FAILED( "RENDEZVOUS OCCURRED" );
117
     END IF;
118
 
119
     IF  QUEUE_NOT_EMPTY
120
     THEN
121
          FAILED( "ENTRY QUEUE NOT EMPTY" );
122
     END IF;
123
 
124
     IF  ELSE_BRANCH_TAKEN  THEN
125
          NULL ;
126
     ELSE
127
          FAILED( "RENDEZVOUS ATTEMPTED?" );
128
     END IF;
129
 
130
     RESULT;
131
 
132
 
133
END  C97201H ;

powered by: WebSVN 2.1.0

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