From: Stephan Heinemann <zombie@cs.tu-berlin.de>
Subject: No_Abort_Statements
Date: 31 Jul 2003 19:40:32 GMT
Date: 2003-07-31T19:40:32+00:00 [thread overview]
Message-ID: <bgbrbg$3ds$1@news.cs.tu-berlin.de> (raw)
D.7.5 says
No_Abort_Statements
There are no abort_statements, and there are no calls on
Task_Identification.Abort_Task.
My compiler (gnat) detects only the violation caused by "abort T;". But I
get
away with "Abort_Task(T'Identity);" or using ATC via select (see below).
Now, I am not quite sure what this restriction really covers... Abort_Task
should obviously be detected but what about ATC?
Thanks in advance,
Stephan
pragma Restrictions(No_Abort_Statements);
with Ada.Task_Identification; use Ada.Task_Identification;
with Ada.Text_IO; use Ada.Text_IO;
procedure No_Abort_Statements is
task type A;
task body A is
begin
loop
Put_Line(Image(Current_Task));
delay 0.5;
end loop;
end A;
T : A;
begin
abort T;
--Abort_Task(T'Identity);
--select
-- delay 1.0;
-- Put_Line("aborted");
--then abort
-- declare
-- T : A;
-- begin
-- delay 2.0;
-- end;
--end select;
end No_Abort_Statements;
next reply other threads:[~2003-07-31 19:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-31 19:40 Stephan Heinemann [this message]
2003-07-31 20:55 ` No_Abort_Statements Randy Brukardt
2003-07-31 22:05 ` No_Abort_Statements Samuel Tardieu
2003-08-01 20:07 ` No_Abort_Statements Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox