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-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE, XPRIO autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ann: GWindows release, 29-May-2023 Date: Sat, 17 Jun 2023 02:18:05 -0500 Organization: A noiseless patient Spider Message-ID: References: <9a893d03-ccf9-46cb-b7f0-1e46263cf8b0n@googlegroups.com> Injection-Date: Sat, 17 Jun 2023 07:17:58 -0000 (UTC) Injection-Info: dont-email.me; posting-host="e397dc105e734c45be259b9319dda610"; logging-data="1237922"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19WVu1LrKbIZjgYdOogmbjmG5eL3//mcvI=" Cancel-Lock: sha1:mpYIHtnUhHYQ2BLrPUXg2EYkDYw= X-MSMail-Priority: Normal X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-Priority: 3 Xref: news.eternal-september.org comp.lang.ada:65321 List-Id: "Gautier write-only address" wrote in message news:9a893d03-ccf9-46cb-b7f0-1e46263cf8b0n@googlegroups.com... > Something thougher is a couple of intrinsic imports (sync_add_and_fetch, > sync_sub_and_fetch): > function sync_add_and_fetch > (Ref : access Interfaces.Unsigned_32; > Add : Interfaces.Unsigned_32) > return Interfaces.Unsigned_32 > with > Import, > Convention => Intrinsic, > External_Name => "__sync_add_and_fetch_4"; > >which seems to be specific to GCC (and actually, not even all versions of >GCC...) This looks like an atomic operation. A portable Ada definition of such operations is found in C.6.1-C.6.4 of Ada 2022. Probably those could be used to replace the operation (of course, that would limit one to compilers supporting that part of Ada 2022; dunno if anyone is doing that yet). Randy.