From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a0c:ea4d:: with SMTP id u13mr14539127qvp.22.1623602782213; Sun, 13 Jun 2021 09:46:22 -0700 (PDT) X-Received: by 2002:a25:fc1c:: with SMTP id v28mr19059061ybd.277.1623602782035; Sun, 13 Jun 2021 09:46:22 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 13 Jun 2021 09:46:21 -0700 (PDT) In-Reply-To: <14166772-2507-4953-8843-57fe35b0f6fbn@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=174.71.119.33; posting-account=ix5KpAoAAAD9zo_4u1FxHVmn1uZn7U_d NNTP-Posting-Host: 174.71.119.33 References: <1d798609-8b73-4bc6-b74f-e435e8af8fedn@googlegroups.com> <26182d75-4a84-47d2-b151-bbcb01964fabn@googlegroups.com> <14166772-2507-4953-8843-57fe35b0f6fbn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5470ede9-7036-4af7-8087-6dc8ff8f9ca0n@googlegroups.com> Subject: Re: non-preemptive tasking on GNAT 2020 Windows 10 multicore AMD From: Dan Winslow Injection-Date: Sun, 13 Jun 2021 16:46:22 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62218 List-Id: On Sunday, June 13, 2021 at 11:44:00 AM UTC-5, Dan Winslow wrote: > On Sunday, June 13, 2021 at 8:16:31 AM UTC-5, Jeffrey R. Carter wrote:=20 > > On 6/13/21 2:06 PM, Dan Winslow wrote:=20 > > >=20 > > > Well. You are confirming that I shouldn't expect the behavior I am lo= oking for? How does linux do in this regard, I could use it if needed.=20 > > with Xubuntu 21.04 and GNAT 11 I get=20 > >=20 > > ~/Code$ ./winslow=20 > > 8 CPUs=20 > > one=20 > > Task one done, x=3D 1000001=20 > > two=20 > > Task two done, y=3D 1000001=20 > > main done, x 1000001 y 1000001=20 > >=20 > > I get this with or without the scheduling pragma in gnat.adc.=20 > >=20 > > --=20 > > Jeff Carter=20 > > "Don't knock masturbation. It's sex with someone I love."=20 > > Annie Hall=20 > > 45 > Yep, just found that myself. So, I guess since the tasks get mapped onto = underlying os threads, windows has its own ideas and does things like autom= atic priority promotion and other non-compliant stuff. Too bad, but I guess= kind of makes sense because windows does everything possible, most likely,= to prevent any kind of thread monopolization. Would be nice if the gnat wi= ndows version at least threw a warning that 'hey, it's legal, but it aint g= onna work on windows'.=20 >=20 > So, works perfectly on linux. Probably would on windows too if I knew how= to swap out for a pthreads implementation on windows.=20 >=20 > Thanks! Odd that it doesn't require the gnat.adc pragma though. I suppose linux is = counting on delay statements or other sync points to swap. For what I need,= that's perfect.