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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,98dd0f70b14ccb75 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-31 22:32:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!lnsnews.lns.cornell.edu!newsstand.cit.cornell.edu!ngpeer.news.aol.com!newsfeed1!bredband!news.algonet.se!algonet!news-stob.telia.net!telia.net!217.209.241.173.MISMATCH!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail From: David Holm Newsgroups: comp.lang.ada Subject: Re: Linux Calls Message-ID: <20030801073231.3b2c0a11.david@realityrift.com> References: X-Newsreader: Sylpheed version 0.8.10claws (GTK+ 1.2.10; i386-portbld-freebsd4.8) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Fri, 01 Aug 2003 05:32:42 GMT NNTP-Posting-Host: 217.208.105.88 X-Complaints-To: abuse@telia.com X-Trace: newsc.telia.net 1059715962 217.208.105.88 (Fri, 01 Aug 2003 07:32:42 CEST) NNTP-Posting-Date: Fri, 01 Aug 2003 07:32:42 CEST Organization: Telia Internet Xref: archiver1.google.com comp.lang.ada:41119 Date: 2003-08-01T05:32:42+00:00 List-Id: On 31 Jul 2003 20:26:17 +0100 Simon Wright wrote: > "Jeremy Smith" writes: > > > I have two tasks, built using gnat 3.13p, running under Linux, Red Hat 8. > > The idea was to have one task processing and performing cyclic tasks > > continuously while the other task waits for commands and responds to them > > right away. To accomplish this I am want to run the command receipt task at > > a higher priority than the continuous processing task. My problem is that > > the commands are coming over an IPC message queue, so when the command > > receipt task calls msgget (visible via pragma Import) it blocks but does it > > outside the Ada RTS. The continuous processing task never gains context > > because the Ada RTS doesn't know the command receipt task has blocked > > pending receipt of the next command. > > > > Anybody know a way to wrap a blocking OS call so that the other lower > > priority Ada tasks can play until it returns? > > It sounds as though you're using the "fsu" version of the runtime > system - you need the version that uses native threads. On recent > editions of GNAT, & I'm pretty sure on 3.13p, you get a choice between > fsu & native; check out the installation instructions. (as far as I > can remember, it involves switching the symlinks for adainclude, > adalib in ...lib/gcc-lib/i686-pc-linux-gnu/2.8.1/ . > > The binary I have is called gnat-3.13p-i686-pc-linux-gnu-bin.tar.gz At least with 3.14p and 3.15p you can select the run-time system with --RTS=fsu/native when you call gnatmake och gnatgcc. //David Holm