From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: * X-Spam-Status: No, score=1.1 required=3.0 tests=BAYES_00,FROM_SUSPICIOUS_NTLD, FROM_SUSPICIOUS_NTLD_FP,PDS_OTHER_BAD_TLD autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!vEeMgk/69DkKBLrjYdAIjg.user.46.165.242.75.POSTED!not-for-mail From: Fernando Oleo Blanco Newsgroups: comp.lang.ada Subject: Re: Help: Ada in NetBSD Date: Fri, 24 Sep 2021 11:44:56 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <646f270d-0e65-46a5-b40a-02afab608f1en@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: gioia.aioe.org; logging-data="54429"; posting-host="vEeMgk/69DkKBLrjYdAIjg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:62835 List-Id: On 24.09.21 09:48, Simon Wright wrote: > Fernando Oleo Blanco writes: > >> pragma Assert (Result in 0 | EPERM | EINVAL); > > EINVAL was added 5 years ago. The others have been there for 20 years > (when Ada was added to FSF GCC, according to git blame in > https://github.com/gcc-mirror/gcc). > Thank you for your reply Simon. But I think I have understood it now. It really does not matter what that function "pthread_set..." returns, even if it is an error. SCHED_OTHER is the default scheduler FIFO and RR are more RTOS-like and are generally reserved for root. I would expect that most programs that spawn threads generally do not care about the priority, since that is managed by the OS. That would mean that even if that function fails, once the program is spawns the actual process, the OS just does it, independently of what the program tried to do. That would explain why it works in OpenBSD, FreeBSD etc, and why I was not getting this error before I added assertions. Because it really does not matter. I am still very salty about code that knows it fails, but does nothing/is not cleaned up... I patched however that function and reran ACATS. Now, I am no longer getting that assertion failure (s-taprop.adb:659). And at the very least the test I worked with (a83a02b) is now fully fixed. However, now, other assertion failures in a couple other places are taking place, primarily s-tassta.adb:1643, which is related to pragma Assert (Self_ID.Common.Wait_Count = 0); Which, from the comments, the master should not have any slaves but it does somehow (mine is returning a 1). The s-tassta.adb file is shared among all systems (there are no OS specific files). Another common error is s-taprop.adb:463 and STORAGE_ERROR : s-intman.adb:136 I will keep on debugging......... -- Fernando Oleo Blanco https://irvise.xyz