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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b180fbb5257e142f X-Google-Attributes: gid103376,public From: Simon Wright Subject: Re: Native rts not working on linux (glibc) Date: 1998/11/17 Message-ID: #1/1 X-Deja-AN: 413045894 X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 References: <717sfl$ple$1@nyheter.chalmers.se> <72e20a$8h5$1@nnrp1.dejanews.com> <72egna$6na$1@nyheter.chalmers.se> <72evc1$l0$1@nnrp1.dejanews.com> <72h3gu$lgd$1@nyheter.chalmers.se> <72q5m8$6ih$1@nyheter.chalmers.se> X-Complaints-To: abuse@demon.net X-Trace: news.demon.co.uk 911368634 nnrp-05:18441 NO-IDENT pogner.demon.co.uk:158.152.70.98 Organization: At Home Newsgroups: comp.lang.ada Date: 1998-11-17T00:00:00+00:00 List-Id: d96andgi@dtek.chalmers.se (Anders Gidenstam) writes: > In article , > Simon Wright writes: > >Tasking programs will run fine on Linux with GNAT. If they don't there > >is something wrong! > > > >As far as I can tell the code that does this is in Set_Priority in s-taprop.adb: > > > > Result := pthread_setschedparam (T.LL.Thread, SCHED_FIFO, Param'Access); > > pragma Assert (Result = 0 or else Result = EPERM); > > > >If you are root, you get the priority (Result = 0) > >If not, the request fails quietly (Result = EPERM) > >... or something terrible has occurred > > Well, I've found the problem my s-taprop.adb looks like tihs: > > Result := pthread_setschedparam (T.LL.Thread, SCHED_FIFO, Param'Access); > pragma Assert (Result = 0 > or else Shutdown ("GNULLI failure---Set_Priority")); > > Not very strange that my programs didn't run...(when I wasn't root)... > Might it be possible to remove the offending Shutdown and just ignore > that the call failed? Oh dear, I think the code I posted was from a not-yet-released GNAT version. Now you show me the code you see, I seem to remember finding the same code last time I looked and being puzzled that tasking was working! If you are getting the GNULLI message indicated then it certainly would seem worth trying this change.