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

* Re: Concurrency in Ada in a Linux and Solaris
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Georg Bauhaus @ 2004-04-07 19:06 UTC (permalink / raw)


Helio <heltESTONOena@hotmail.com> wrote:
: Hi,
: 
: The code bellow compiled and executed in a Linux system [1] doesn't write
: nothing at output.

With GNAT 3.15p, a GCC 3.4 and a GCC 3.5 on Debian stable I get
lots of output.




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

* Re: Concurrency in Ada in a Linux and Solaris
  2004-04-07 19:53   ` Ludovic Brenta
@ 2004-04-07 19:51     ` Helio
  2004-04-07 20:29       ` Ludovic Brenta
  0 siblings, 1 reply; 5+ messages in thread
From: Helio @ 2004-04-07 19:51 UTC (permalink / raw)


El dia Wed, 07 Apr 2004 21:53:58 +0200, en/na Ludovic Brenta va escriure:

>...
> Helio, if the Linux kernel is >= 2.6, you need to set
> LD_ASSUME_KERNEL=2.4.1 before starting the program.  Please let me
> know if this works.

It's work!

I had installed a "gnat" package (with libgtkada2-dev) with kernel 2.6 and
it doesn't work.

I tried to install "gnat-3.3" package (in conflict with gnat and
libgtkada2-dev) and the code works well, but I want to program with gtk :-(

Finally, with "gnat" and "libgtkada2-dev" installed and a marvellous
"LD_ASSUME_KERNEL=2.4.1" it works and I can program with gtk.

Thank's George and Ludovic.

And now, another question, What difference exists between gnat-3.3 and
gnat?




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

* Re: Concurrency in Ada in a Linux and Solaris
  2004-04-07 19:06 ` Georg Bauhaus
@ 2004-04-07 19:53   ` Ludovic Brenta
  2004-04-07 19:51     ` Helio
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Brenta @ 2004-04-07 19:53 UTC (permalink / raw)


Georg Bauhaus writes:
> Helio wrote:
> : Hi,
> : 
> : The code bellow compiled and executed in a Linux system [1] doesn't write
> : nothing at output.
> 
> With GNAT 3.15p, a GCC 3.4 and a GCC 3.5 on Debian stable I get
> lots of output.

This looks like the LD_ASSUME_KERNEL thing.

Helio, if the Linux kernel is >= 2.6, you need to set
LD_ASSUME_KERNEL=2.4.1 before starting the program.  Please let me
know if this works.

-- 
Ludovic Brenta.




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

* Re: Concurrency in Ada in a Linux and Solaris
  2004-04-07 19:51     ` Helio
@ 2004-04-07 20:29       ` Ludovic Brenta
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Brenta @ 2004-04-07 20:29 UTC (permalink / raw)


Helio writes:
> El dia Wed, 07 Apr 2004 21:53:58 +0200, en/na Ludovic Brenta va escriure:
> 
> >...
> > Helio, if the Linux kernel is >= 2.6, you need to set
> > LD_ASSUME_KERNEL=2.4.1 before starting the program.  Please let me
> > know if this works.
> 
> It's work!
> 
> I had installed a "gnat" package (with libgtkada2-dev) with kernel 2.6 and
> it doesn't work.
> 
> I tried to install "gnat-3.3" package (in conflict with gnat and
> libgtkada2-dev) and the code works well, but I want to program with gtk :-(
> 
> Finally, with "gnat" and "libgtkada2-dev" installed and a marvellous
> "LD_ASSUME_KERNEL=2.4.1" it works and I can program with gtk.
> 
> Thank's George and Ludovic.

Great, another happy Debian user :)

> And now, another question, What difference exists between gnat-3.3 and
> gnat?

See http://users.skynet.be/ludovic.brenta/ada-policy.html.  I posted
this document just yesterday and am now collecting comments to improve
it.  Feel free to contribute.

-- 
Ludovic Brenta.




^ 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