Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ada > #49612
| From | Fernando Oleo Blanco <irvise_ml@irvise.xyz> |
|---|---|
| Newsgroups | comp.lang.ada |
| Subject | Re: Help: Ada in NetBSD |
| Date | 2021-09-23 21:53 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <siim0b$q2e$1@gioia.aioe.org> (permalink) |
| References | (1 earlier) <646f270d-0e65-46a5-b40a-02afab608f1en@googlegroups.com> <sgo4f7$lri$1@gioia.aioe.org> <si2jm1$1i9p$1@gioia.aioe.org> <si54o5$h7b$1@gioia.aioe.org> <sig2b7$i95$1@gioia.aioe.org> |
Okay, so another short blog post. This is going to be a bit of a fucking
rant.
So... remember when I said that NetBSD expected a priority value of -1
when using SCHED_ODER? And that that was not POSIX compilant? Well,
after a nice conversation in #netbsd, it has been decided to escalate
this matter into a PR/ML discussion. All that good :)
But the question on how does Linux work then? Remained... So I ran the
ACATS suite with debugging symbols, recompilation and assertions to
check. And guess what?
Let the code speak:
else
Param.sched_priority := 0;
Result :=
pthread_setschedparam
(T.Common.LL.Thread,
SCHED_OTHER, Param'Access);
end if;
pragma Assert (Result in 0 | EPERM | EINVAL);
end Set_Priority;
So the Set_Priority function receives the Default_Priority value, which
I think was 48. But when it goes into the actual branch, it knows that
that default value is stupid and discards it (sets it to 0). That would
be all nice and dandy, but here is the problem, 0 is a valid value
because most OS/arches use it, there is no reason 0 is valid (as per POSIX).
And what really gets me is that Pragma... Whomever wrote it probably was
getting errors and decided that that was fine. EPERM? EINVAL? Not my
problem! No wonder there is a specific s-taprop__linux.adb...
So here we are. NetBSD is not POSIX compliant (min and max SCHED_OTHER
priority is -1, which is an error code for the function that should
return it), and Linux hardcodes it. Amazing, just amazing...
My solution? Email the NetBSD people. But that won't be enough. So I am
thinking in patching the s-taprop__posix.adb file to try it with the
default priority, if it fails, with 0, if it fails, with -1 for NetBSD...
Oh well... I thought that the state of GNAT was better... Anyhow, regards,
--
Fernando Oleo Blanco
https://irvise.xyz
Back to comp.lang.ada | Previous | Next — Previous in thread | Next in thread | Find similar
Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-08-29 13:06 +0200
Re: Help: Ada in NetBSD Stephane Carrez <stephane.carrez@gmail.com> - 2021-08-29 06:19 -0700
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-08-29 20:08 +0200
Re: Help: Ada in NetBSD Simon Wright <simon@pushface.org> - 2021-08-29 19:25 +0100
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-08-29 22:36 +0200
Re: Help: Ada in NetBSD Stephane Carrez <stephane.carrez@gmail.com> - 2021-08-29 15:08 -0700
Re: Help: Ada in NetBSD Simon Wright <simon@pushface.org> - 2021-08-30 08:37 +0100
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-08-30 10:14 +0200
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-08-30 12:24 +0200
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-08-30 14:15 +0200
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-08-30 20:49 +0200
Re: Help: Ada in NetBSD Simon Wright <simon@pushface.org> - 2021-08-30 20:23 +0100
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-09-01 11:44 +0200
Re: Help: Ada in NetBSD Simon Wright <simon@pushface.org> - 2021-09-01 22:41 +0100
Re: Help: Ada in NetBSD "Randy Brukardt" <randy@rrsoftware.com> - 2021-09-02 17:16 -0500
Re: Help: Ada in NetBSD Simon Wright <simon@pushface.org> - 2021-09-03 21:18 +0100
Re: Help: Ada in NetBSD Simon Wright <simon@pushface.org> - 2021-08-29 18:34 +0100
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-08-29 19:45 +0200
Re: Help: Ada in NetBSD "John R. Marino" <mfl-commissioner@marino.st> - 2021-09-01 06:28 -0700
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-09-01 16:58 +0200
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-09-17 19:36 +0200
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-09-18 18:39 +0200
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-09-22 22:05 +0200
Re: Help: Ada in NetBSD Simon Wright <simon@pushface.org> - 2021-09-22 21:57 +0100
Re: Help: Ada in NetBSD "Luke A. Guest" <laguest@archeia.com> - 2021-09-23 09:04 +0100
Re: Help: Ada in NetBSD Kevin Chadwick <m8il1ists@gmail.com> - 2021-09-23 03:48 -0700
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-09-23 19:01 +0200
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-09-23 19:04 +0200
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-09-23 21:53 +0200
Re: Help: Ada in NetBSD Simon Wright <simon@pushface.org> - 2021-09-24 08:48 +0100
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-09-24 11:44 +0200
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-09-13 20:49 +0200
Re: Help: Ada in NetBSD Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2021-09-13 18:24 -0400
Re: Help: Ada in NetBSD Fernando Oleo Blanco <irvise_ml@irvise.xyz> - 2021-09-17 19:19 +0200
csiph-web