From: Helio <heltESTONOena@hotmail.com>
Subject: Concurrency in Ada in a Linux and Solaris
Date: Wed, 07 Apr 2004 19:47:29 +0200
Date: 2004-04-07T19:47:29+02:00 [thread overview]
Message-ID: <pan.2004.04.07.17.47.17.601179@hotmail.com> (raw)
Hi,
The code bellow compiled and executed in a Linux system [1] doesn't write
nothing at output. However, the same code compiled and executed in a
Solaris system [2] run right [3].
Any idea?
[1] Linux, debian testing, gnat 3.15p-7, gcc 3.3
[2] Solaris 5.7, gnat 3.11, gcc 2.95
[3]
./principal
RsiTimer
Interrupcion?PetekanInterrupcion?...
-- code --
with ada.text_IO;
procedure principal is
task printer is
entry put(s: in string);
entry put_line(s: in string);
end printer;
task body printer is
begin
loop
select
accept put(s: in string) do
Ada.Text_IO.Put(s);
end put;
or
accept put_line(s: in string) do
Ada.Text_IO.Put_Line(s);
end put_line;
end select;
end loop;
end printer;
task rsi is
entry interrupcion;
end rsi;
task body rsi is
begin
printer.put("Rsi");
loop
select
accept interrupcion do
printer.Put("Petekan");
end interrupcion;
or
delay 1.0;
printer.Put("FalloRSI");
end select;
end loop;
end rsi;
task timer;
task body timer is
begin
printer.Put_Line("Timer");
loop
printer.Put("Interrupcion?");
select
rsi.interrupcion;
or
delay 0.5;
printer.Put_Line("Rsi no trata interrupcion");
end select;
end loop;
end timer;
begin
Null;
end principal;
next reply other threads:[~2004-04-07 17:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-07 17:47 Helio [this message]
2004-04-07 19:06 ` Concurrency in Ada in a Linux and Solaris Georg Bauhaus
2004-04-07 19:53 ` Ludovic Brenta
2004-04-07 19:51 ` Helio
2004-04-07 20:29 ` Ludovic Brenta
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox