comp.lang.ada
 help / color / mirror / Atom feed
* Concurrency in Ada in a Linux and Solaris
@ 2004-04-07 17:47 Helio
  2004-04-07 19:06 ` Georg Bauhaus
  0 siblings, 1 reply; 5+ messages in thread
From: Helio @ 2004-04-07 17:47 UTC (permalink / 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;



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-04-07 20:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-07 17:47 Concurrency in Ada in a Linux and Solaris Helio
2004-04-07 19:06 ` Georg Bauhaus
2004-04-07 19:53   ` Ludovic Brenta
2004-04-07 19:51     ` Helio
2004-04-07 20:29       ` Ludovic Brenta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox