From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc90e355ba0a1f8f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-08 14:30:45 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.stueberl.de!proxad.net!feeder2-1.proxad.net!news2-2.free.fr!not-for-mail From: "Patrice Freydiere" Subject: Re: Ada multi-threaded programs do not terminate under RedHat Linux Date: Sat, 08 Nov 2003 22:36:41 +0100 User-Agent: Pan/0.13.0 (The whole remains beautiful) Message-ID: Newsgroups: comp.lang.ada References: <43f0a81.0311071228.6620c6c2@posting.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Organization: Guest of ProXad - France NNTP-Posting-Date: 08 Nov 2003 23:30:44 MET NNTP-Posting-Host: 62.147.21.168 X-Trace: 1068330644 news2-2.free.fr 27599 62.147.21.168:33366 X-Complaints-To: abuse@proxad.net Xref: archiver1.google.com comp.lang.ada:2266 Date: 2003-11-08T23:30:44+01:00 List-Id: it works fine on my Linux 9.0 mandrake box. I use a Gnat 3.15, given on the gnat web site. Patrice ps: be careful, gnat has it's own gcc version that can interfere with local gcc version if it's first in path. On Fri, 07 Nov 2003 12:28:27 +0000, Ruben Stranders wrote: > I'm a Ada newbie and I have to make a very simple program to > demonstrate the use of multithreading in Ada. For that purpose, I > created the following program. > > ============================ > procedure test is > task type counter; > > task body counter is > i : integer :=0; > begin > put_line("Start"); > while i < 10000 loop > i := i + 1; > end loop; > put_line("Finish"); > end; > > task1 : counter; > > begin > put_line("Test"); > end; > ============================ > > I've compiled it under RedHat Linux 9.0 with "gnatmake test.adb". > Unfortunately, the resulting program doesn't terminate. Instead of the > expected output: > > Starting > Finished > Test > > it only prints the first two lines. The body of the procedure "test" > is never called. I've tried this with several other programs and on > different machines (all with RedHat 9.0). Can anyone give me a > pointer? > > Regards, > > Ruben