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

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

Line No. Rev Author Line
1 149 jeremybenn
-- C97204A.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 THE EXCEPTION  TASKING_ERROR  WILL BE RAISED IF THE CALLED
26
--     TASK HAS ALREADY COMPLETED ITS EXECUTION AT THE TIME OF THE
27
--     CONDITIONAL_ENTRY_CALL.
28
 
29
 
30
-- RM 5/28/82
31
-- SPS 11/21/82
32
-- PWN 09/11/94  REMOVED PRAGMA PRIORITY FOR ADA 9X.
33
 
34
with Impdef;
35
WITH REPORT; USE REPORT;
36
WITH SYSTEM; USE SYSTEM;
37
PROCEDURE  C97204A  IS
38
 
39
     -- THE TASK WILL HAVE HIGHER PRIORITY ( PRIORITY'LAST )
40
 
41
BEGIN
42
 
43
 
44
     -------------------------------------------------------------------
45
 
46
 
47
     TEST ("C97204A", "CHECK THAT THE EXCEPTION  TASKING_ERROR  WILL" &
48
                      " BE RAISED IF THE CALLED TASK HAS ALREADY"     &
49
                      " COMPLETED ITS EXECUTION AT THE TIME OF THE"   &
50
                      " CONDITIONAL_ENTRY_CALL"                       );
51
 
52
 
53
     DECLARE
54
 
55
 
56
          TASK TYPE  T_TYPE  IS
57
 
58
 
59
               ENTRY  E ;
60
 
61
          END  T_TYPE ;
62
 
63
 
64
          T_OBJECT1 : T_TYPE ;
65
 
66
 
67
          TASK BODY  T_TYPE  IS
68
               BUSY : BOOLEAN := FALSE ;
69
          BEGIN
70
 
71
               NULL;
72
 
73
          END  T_TYPE ;
74
 
75
 
76
     BEGIN
77
 
78
 
79
          FOR  I  IN  1..5  LOOP
80
               EXIT WHEN  T_OBJECT1'TERMINATED ;
81
               DELAY 10.0 * Impdef.One_Second;
82
          END LOOP;
83
 
84
 
85
          IF NOT  T_OBJECT1'TERMINATED  THEN
86
               COMMENT( "TASK NOT YET TERMINATED (AFTER 50 S.)" );
87
          END IF;
88
 
89
 
90
          BEGIN
91
 
92
               SELECT
93
                    T_OBJECT1.E ;
94
                    FAILED( "CALL WAS NOT DISOBEYED" );
95
               ELSE
96
                    FAILED( "'ELSE' BRANCH TAKEN INSTEAD OF TSKG_ERR" );
97
               END SELECT;
98
 
99
               FAILED( "EXCEPTION NOT RAISED" );
100
 
101
          EXCEPTION
102
 
103
               WHEN  TASKING_ERROR  =>
104
                    NULL ;
105
 
106
               WHEN  OTHERS  =>
107
                    FAILED(  "WRONG EXCEPTION RAISED"  );
108
 
109
          END ;
110
 
111
 
112
     END ;
113
 
114
 
115
     -------------------------------------------------------------------
116
 
117
 
118
 
119
     RESULT;
120
 
121
 
122
END  C97204A ;

powered by: WebSVN 2.1.0

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