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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
-- C97201E.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  E:  THE BODY OF THE TASK CONTAINING THE CALLED ENTRY
29
--     DOES NOT CONTAIN AN ACCEPT_STATEMENT FOR THAT ENTRY  -
30
--     AND THIS FACT CAN NOT BE DETERMINED STATICALLY.
31
--     (THE ENTRY BELONGS TO AN ENTRY FAMILY; SOME FAMILY MEMBERS
32
--     ARE "ACCEPTABLE", BUT NOT THE CALLED ONE.)
33
 
34
 
35
-- RM 4/13/82
36
 
37
 
38
WITH REPORT; USE REPORT;
39
PROCEDURE C97201E IS
40
 
41
     ELSE_BRANCH_TAKEN    :  BOOLEAN  :=  FALSE ;
42
 
43
BEGIN
44
 
45
 
46
     TEST ("C97201E", "CHECK THAT NO RENDEZVOUS REQUESTED BY"      &
47
                      " A CONDITIONAL_ENTRY_CALL CAN EVER OCCUR"   &
48
                      " IN THE ABSENCE OF A CORRESPONDING "        &
49
                      " ACCEPT_STATEMENT "                         );
50
 
51
 
52
     DECLARE
53
 
54
          SUBTYPE  SHORT  IS  INTEGER RANGE 10..20 ;
55
 
56
          KEEP_ALIVE  :  INTEGER  := 15 ;
57
 
58
          TASK  T  IS
59
               ENTRY  DO_IT_NOW_ORELSE ( SHORT ) ;
60
          END  T ;
61
 
62
 
63
          TASK BODY  T  IS
64
          BEGIN
65
 
66
               -- NO ACCEPT_STATEMENT FOR THE ENTRY_CALL BEING TESTED
67
               ACCEPT  DO_IT_NOW_ORELSE ( IDENT_INT(15) );
68
 
69
                                     -- THIS ALSO PREVENTS THIS SERVER
70
                                     --     TASK FROM TERMINATING IF
71
                                     --     UPON ACTIVATION
72
                                     --     IT GETS TO RUN    
73
                                     --     AHEAD OF THE CALLER (WHICH
74
                                     --     WOULD LEAD TO A SUBSEQUENT
75
                                     --     TASKING_ERROR AT THE TIME OF
76
                                     --     THE NO-WAIT CALL).
77
 
78
          END ;
79
 
80
 
81
     BEGIN
82
 
83
          SELECT
84
               T.DO_IT_NOW_ORELSE (10) ;  -- ACCEPT_STATEMENT HAS  15
85
          ELSE              -- (I.E. CALLER ADOPTS A NO-WAIT POLICY)
86
                            --      THEREFORE THIS BRANCH MUST BE CHOSEN
87
               ELSE_BRANCH_TAKEN := TRUE ;
88
               COMMENT( "ELSE_BRANCH  TAKEN" );
89
          END SELECT;
90
 
91
          T.DO_IT_NOW_ORELSE(KEEP_ALIVE) ;-- THIS ALSO UPDATES NONLOCALS
92
 
93
     END;   -- END OF BLOCK CONTAINING THE ENTRY CALL
94
 
95
 
96
     -- BY NOW, THE TASK IS TERMINATED
97
 
98
     IF  ELSE_BRANCH_TAKEN  THEN
99
          NULL ;
100
     ELSE
101
          FAILED( "RENDEZVOUS ATTEMPTED?" );
102
     END IF;
103
 
104
     RESULT;
105
 
106
 
107
END  C97201E ;

powered by: WebSVN 2.1.0

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