URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 304 |
Rev 338 |
-- { dg-do run }
|
-- { dg-do run }
|
|
|
with Ada.Text_Io; use Ada.Text_Io;
|
with Ada.Text_Io; use Ada.Text_Io;
|
|
|
procedure requeue1 is
|
procedure requeue1 is
|
|
|
protected P is
|
protected P is
|
entry Requeue_Without_Abort;
|
entry Requeue_Without_Abort;
|
entry Queue_Without;
|
entry Queue_Without;
|
procedure Open;
|
procedure Open;
|
private
|
private
|
Opened: Boolean := False;
|
Opened: Boolean := False;
|
end P;
|
end P;
|
|
|
protected body P is
|
protected body P is
|
entry Requeue_Without_Abort when True is
|
entry Requeue_Without_Abort when True is
|
begin
|
begin
|
-- BUG: after this requeue no time out of the call should be possible
|
-- BUG: after this requeue no time out of the call should be possible
|
requeue Queue_Without;
|
requeue Queue_Without;
|
end Requeue_Without_Abort;
|
end Requeue_Without_Abort;
|
|
|
entry Queue_Without when Opened is
|
entry Queue_Without when Opened is
|
begin
|
begin
|
Opened := False;
|
Opened := False;
|
end Queue_Without;
|
end Queue_Without;
|
|
|
procedure Open is
|
procedure Open is
|
begin
|
begin
|
Opened := True;
|
Opened := True;
|
end Open;
|
end Open;
|
end P;
|
end P;
|
|
|
-- Test of timed entry call to an entry with requeue without abort
|
-- Test of timed entry call to an entry with requeue without abort
|
task T_Without;
|
task T_Without;
|
task body T_Without is
|
task body T_Without is
|
begin
|
begin
|
select
|
select
|
P.Requeue_Without_Abort;
|
P.Requeue_Without_Abort;
|
or
|
or
|
delay 1.0;
|
delay 1.0;
|
Put_Line("failed");
|
Put_Line("failed");
|
end select;
|
end select;
|
|
|
exception
|
exception
|
when others => Put_Line ("failed");
|
when others => Put_Line ("failed");
|
end T_Without;
|
end T_Without;
|
|
|
begin
|
begin
|
delay 3.0;
|
delay 3.0;
|
P.Open;
|
P.Open;
|
end;
|
end;
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.