Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

It's easy to get on the internet and forget you have a life -- Topic on #LinuxGER


devel / comp.lang.c++ / A Java- / .NET-like monitor

SubjectAuthor
* A Java- / .NET-like monitorBonita Montero
+* Re: A Java- / .NET-like monitorBonita Montero
|`* Re: A Java- / .NET-like monitorChris M. Thomasson
| +* Re: A Java- / .NET-like monitorChris M. Thomasson
| |+* Re: A Java- / .NET-like monitorBonita Montero
| ||`- Re: A Java- / .NET-like monitorChris M. Thomasson
| |`- Re: A Java- / .NET-like monitorChris M. Thomasson
| `* Re: A Java- / .NET-like monitorBonita Montero
|  `- Re: A Java- / .NET-like monitorChris M. Thomasson
+* Re: A Java- / .NET-like monitorKaz Kylheku
|`* Re: A Java- / .NET-like monitorBonita Montero
| `* Re: A Java- / .NET-like monitorKaz Kylheku
|  `* Re: A Java- / .NET-like monitorBonita Montero
|   +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   |`* Re: A Java- / .NET-like monitorKaz Kylheku
|   | `- Re: A Java- / .NET-like monitorChris M. Thomasson
|   +* Re: A Java- / .NET-like monitorKaz Kylheku
|   |`* Re: A Java- / .NET-like monitorBonita Montero
|   | +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |`* Re: A Java- / .NET-like monitorBonita Montero
|   | | `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |+- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |`* Re: A Java- / .NET-like monitorBonita Montero
|   | |   | `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |+- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |`* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   | `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |  +- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |   `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |`* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    | `- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    +* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |`* Re: A Java- / .NET-like monitorPavel
|   | |   |   |    | `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |  `* Re: A Java- / .NET-like monitorPavel
|   | |   |   |    |   `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |    `* Re: A Java- / .NET-like monitorPavel
|   | |   |   |    |     +- Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     +* Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     |+* Re: A Java- / .NET-like monitorKaz Kylheku
|   | |   |   |    |     ||+- Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||+- Re: A Java- / .NET-like monitorPavel
|   | |   |   |    |     ||`* Re: A Java- / .NET-like monitorMichael S
|   | |   |   |    |     || `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||   `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||    +- Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||    `* Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||     `* Re: A Java- / .NET-like monitorKaz Kylheku
|   | |   |   |    |     ||      +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |`* Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||      | +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      | |`- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      | `* Re: A Java- / .NET-like monitorFred. Zwarts
|   | |   |   |    |     ||      |  `* Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||      |   `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    `- Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||      +* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |`* Re: A Java- / .NET-like monitorKaz Kylheku
|   | |   |   |    |     ||      | `* Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||      |  +- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |  `* Re: A Java- / .NET-like monitorMichael S
|   | |   |   |    |     ||      |   +- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |   `* Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      |    +* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    |+* Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      |    ||`* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    || `* Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      |    ||  +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |    ||  |`- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |    ||  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    ||   `* Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      |    ||    `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    ||     `* Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      |    ||      `- Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    |`- Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||      |    `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |     `- Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      `- Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     |+- Re: A Java- / .NET-like monitorPavel
|   | |   |   |    |     |`* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     | `* Re: A Java- / .NET-like monitorKaz Kylheku
|   | |   |   |    |     |  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     |   `* Re: A Java- / .NET-like monitorKaz Kylheku
|   | |   |   |    |     |    `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     |     `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |      +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |      |`- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |      `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     |       `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |        `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     |         `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |          `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     |           `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |            `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   `- Re: A Java- / .NET-like monitorBonita Montero
|   | |   `* Re: A Java- / .NET-like monitorPavel
|   | `* Re: A Java- / .NET-like monitorKaz Kylheku
|   `* Re: A Java- / .NET-like monitorChris M. Thomasson
+* Re: A Java- / .NET-like monitorBonita Montero
`* Re: A Java- / .NET-like monitorBonita Montero

Pages:1234567891011
Re: A Java- / .NET-like monitor

<uivd74$15vdk$1@raubtier-asyl.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2641&group=comp.lang.c%2B%2B#2641

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!news.1d4.us!usenet.goja.nl.eu.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 10:04:39 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <uivd74$15vdk$1@raubtier-asyl.eternal-september.org>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uinloo$3d813$1@raubtier-asyl.eternal-september.org>
<uio76q$3gj34$1@raubtier-asyl.eternal-september.org>
<uiolf0$3j4r2$3@dont-email.me>
<uipl0g$3su3r$1@raubtier-asyl.eternal-september.org>
<uirdja$7lqi$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Nov 2023 09:04:36 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="638e4d8f863cffbb5f955914b4bbf384";
logging-data="1244596"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hkt1baX3exwfcE1YSKk1phnbz2i/BvnI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:qc0r4ruYr9QBWjURSnnA+bBowzs=
Content-Language: de-DE
In-Reply-To: <uirdja$7lqi$1@dont-email.me>
 by: Bonita Montero - Tue, 14 Nov 2023 09:04 UTC

Am 12.11.2023 um 21:46 schrieb Chris M. Thomasson:

> Yet, you missed it? Actually, I am not quite sure how to parse your
> response. I have not had the free time to port your code over to a
> Relacy test unit, yet...

Do you really think your Relacy would have helped with my missing "!"
with the initializtion - at a point where I didn't any synchronization
at all ?

Re: A Java- / .NET-like monitor

<uive6t$163u2$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2642&group=comp.lang.c%2B%2B#2642

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 01:21:33 -0800
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <uive6t$163u2$2@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uinloo$3d813$1@raubtier-asyl.eternal-september.org>
<uio76q$3gj34$1@raubtier-asyl.eternal-september.org>
<uiolf0$3j4r2$3@dont-email.me>
<uipl0g$3su3r$1@raubtier-asyl.eternal-september.org>
<uirdja$7lqi$1@dont-email.me>
<uivd74$15vdk$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Nov 2023 09:21:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b2b7e169255d8eb4f38ce399d6fe008";
logging-data="1249218"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Y6r5NhVMGz4GEADlEctQZTO7dotAR1JE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:6qqPAJJDY4JPKicgebJxuP18d+8=
In-Reply-To: <uivd74$15vdk$1@raubtier-asyl.eternal-september.org>
Content-Language: en-US
 by: Chris M. Thomasson - Tue, 14 Nov 2023 09:21 UTC

On 11/14/2023 1:04 AM, Bonita Montero wrote:
> Am 12.11.2023 um 21:46 schrieb Chris M. Thomasson:
>
>> Yet, you missed it? Actually, I am not quite sure how to parse your
>> response. I have not had the free time to port your code over to a
>> Relacy test unit, yet...
>
> Do you really think your Relacy would have helped with my missing "!"
> with the initializtion - at a point where I didn't any synchronization
> at all ?
>
>

My Relacy?

Humm... Btw, my friend created it. Fwiw, I even helped him find some
interesting issues it had during its very early phase. I found a couple
of bugs in Relacy! lol. Anyway, your missing "!"? Huh?

Re: A Java- / .NET-like monitor

<uivgf2$16drp$1@raubtier-asyl.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2643&group=comp.lang.c%2B%2B#2643

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 11:00:05 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <uivgf2$16drp$1@raubtier-asyl.eternal-september.org>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uinloo$3d813$1@raubtier-asyl.eternal-september.org>
<uio76q$3gj34$1@raubtier-asyl.eternal-september.org>
<uiolf0$3j4r2$3@dont-email.me>
<uipl0g$3su3r$1@raubtier-asyl.eternal-september.org>
<uirdja$7lqi$1@dont-email.me>
<uivd74$15vdk$1@raubtier-asyl.eternal-september.org>
<uive6t$163u2$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Nov 2023 10:00:02 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="638e4d8f863cffbb5f955914b4bbf384";
logging-data="1259385"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gxsUFucXZcvXDDBJts6vEBk3ibAXs6G8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Z9waR5/1YAm3vMv+81Seii6QWNQ=
In-Reply-To: <uive6t$163u2$2@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Tue, 14 Nov 2023 10:00 UTC

Am 14.11.2023 um 10:21 schrieb Chris M. Thomasson:

> My Relacy?

Because you love it so much beyond necessity.

> Humm... Btw, my friend created it. Fwiw, I even helped him find some
> interesting issues it had during its very early phase. I found a couple
> of bugs in Relacy! lol. Anyway, your missing "!"? Huh?

My monitor is only 230 lines of code and easy to understand; no
necessity for Relacy. And I'm using my readers-writer-lock with
configurable priority for writers and readers for years without
having applied Relacy to it.

Re: A Java- / .NET-like monitor

<uivgu9$16cth$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2644&group=comp.lang.c%2B%2B#2644

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!news.chmurka.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 02:08:09 -0800
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <uivgu9$16cth$1@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uinloo$3d813$1@raubtier-asyl.eternal-september.org>
<uio76q$3gj34$1@raubtier-asyl.eternal-september.org>
<uiolf0$3j4r2$3@dont-email.me>
<uipl0g$3su3r$1@raubtier-asyl.eternal-september.org>
<uirdja$7lqi$1@dont-email.me>
<uivd74$15vdk$1@raubtier-asyl.eternal-september.org>
<uive6t$163u2$2@dont-email.me>
<uivgf2$16drp$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Nov 2023 10:08:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b2b7e169255d8eb4f38ce399d6fe008";
logging-data="1258417"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/e99KlEd+5tcDZbIygnGFBvggpZ2UNOc8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:NCqLdtFu3HjxPhbVN3xPZotF4Ek=
Content-Language: en-US
In-Reply-To: <uivgf2$16drp$1@raubtier-asyl.eternal-september.org>
 by: Chris M. Thomasson - Tue, 14 Nov 2023 10:08 UTC

On 11/14/2023 2:00 AM, Bonita Montero wrote:
> Am 14.11.2023 um 10:21 schrieb Chris M. Thomasson:
>
>> My Relacy?
>
> Because you love it so much beyond necessity.
>
>> Humm... Btw, my friend created it. Fwiw, I even helped him find some
>> interesting issues it had during its very early phase. I found a
>> couple of bugs in Relacy! lol. Anyway, your missing "!"? Huh?
>
> My monitor is only 230 lines of code and easy to understand; no
> necessity for Relacy.

So, you are finished with any future on the fly corrections, right?

> And I'm using my readers-writer-lock with
> configurable priority for writers and readers for years without
> having applied Relacy to it.
>

Re: A Java- / .NET-like monitor

<uivhqg$16kjm$1@raubtier-asyl.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2645&group=comp.lang.c%2B%2B#2645

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!news.chmurka.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 11:23:15 +0100
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <uivhqg$16kjm$1@raubtier-asyl.eternal-september.org>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uinloo$3d813$1@raubtier-asyl.eternal-september.org>
<uio76q$3gj34$1@raubtier-asyl.eternal-september.org>
<uiolf0$3j4r2$3@dont-email.me>
<uipl0g$3su3r$1@raubtier-asyl.eternal-september.org>
<uirdja$7lqi$1@dont-email.me>
<uivd74$15vdk$1@raubtier-asyl.eternal-september.org>
<uive6t$163u2$2@dont-email.me>
<uivgf2$16drp$1@raubtier-asyl.eternal-september.org>
<uivgu9$16cth$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Nov 2023 10:23:12 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="638e4d8f863cffbb5f955914b4bbf384";
logging-data="1266294"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+B5+xVCW+60ay8Cw8CkGBpf16ovKFTjV4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:i0uuBMZDRxd754fowpi07uisY7s=
In-Reply-To: <uivgu9$16cth$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Tue, 14 Nov 2023 10:23 UTC

Am 14.11.2023 um 11:08 schrieb Chris M. Thomasson:

> So, you are finished with any future on the fly corrections, right?

I'm currently not missing anything with the code.

Re: A Java- / .NET-like monitor

<v7M4N.53197$svP4.45558@fx12.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2646&group=comp.lang.c%2B%2B#2646

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx12.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: A Java- / .NET-like monitor
Newsgroups: comp.lang.c++
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org> <uihnei$21tq7$1@raubtier-asyl.eternal-september.org> <uihnkd$21rae$1@dont-email.me> <uihnnm$21tq7$5@raubtier-asyl.eternal-september.org> <uihnup$21rab$4@dont-email.me> <uihpgl$227kv$1@raubtier-asyl.eternal-september.org> <nuT3N.20309$wvv7.18517@fx14.iad> <uipl56$3sugf$1@raubtier-asyl.eternal-september.org> <20231111205536.387@kylheku.com> <E5e4N.6986$Ubzd.3639@fx36.iad> <20231112203949.483@kylheku.com> <_WA4N.30669$_Oab.744@fx15.iad>
Lines: 48
Message-ID: <v7M4N.53197$svP4.45558@fx12.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 14 Nov 2023 15:12:27 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 14 Nov 2023 15:12:27 GMT
X-Received-Bytes: 3545
 by: Scott Lurndal - Tue, 14 Nov 2023 15:12 UTC

Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo> writes:
>Kaz Kylheku wrote:
>> On 2023-11-13, Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo> wrote:
>>> Kaz Kylheku wrote:
>>>> If you're using POSIX mutexes and conditions, you should call
>>>> pthread_cond_signal and pthread_cond_broadcast outside of the mutex,
>>>> whenever possible.
>>> This is recommended against by the standard for the same reason why Java
>>> implements Hoare monitor behavior. Citation:
>>>
>>> "
>>> The pthread_cond_broadcast() or pthread_cond_signal() functions may be
>>> called by a thread whether or not it currently owns the mutex that
>>> threads calling pthread_cond_wait() or pthread_cond_timedwait() have
>>> associated with the condition variable during their waits; however, if
>>> predictable scheduling behavior is required, then that mutex shall be
>>> locked by the thread calling pthread_cond_broadcast() or
>>> pthread_cond_signal().
>>> "
>>
>> But that text is stupid/defective, because you will not actually get
>> predictable scheduling behavior just by doing that.
>
>This is POSIX text that IIRC was a compromise with real-time (RT) guys.
>Java has thread priorities so it is formally relevant (could be relevant
>in some implementations, too; did not really check). RT guys don't like
>condvars in principle as they are a "gateway drug" to all kinds of prio
>inversions so this was a compromise that permitted the condvar to get to
>POSIX. The meaning of the spec is to prevent priority inversion when
>running on one CPU. An example problematic scenario is as follows:
>
>1. Higher-prio thread A grabs mutex and starts waiting for an event
>(say, posted to a queue that's currently empty). The mutex is released
>at this time to allow posting the event (the standard behavior of
>pthread_cond_wait()).
>2. Now that the A is not runnable, a lower-prio thread B can also run
>and suppose it also wants event from same queue.
>3. Thread C grabs mutex, posts event to the queue, releases the mutex
>4. Before thread C manages to signal the condvar (and by that wake up
>thread A), thread B grabs the lock and steals the event. Higher-prio
>thread A stays waiting for the event -- which is what RT guys hate.
>
>With the behavior recommended by the standard, thread C will first
>notify condvar, by that making thread A runnable and thread A will grab
>the event.

Clearly the application should have used a queue per priority in
this case.

Re: A Java- / .NET-like monitor

<WcM4N.53198$svP4.12968@fx12.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2647&group=comp.lang.c%2B%2B#2647

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx12.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: A Java- / .NET-like monitor
Newsgroups: comp.lang.c++
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org> <uipl56$3sugf$1@raubtier-asyl.eternal-september.org> <20231111205536.387@kylheku.com> <uiq7o0$1thb$1@raubtier-asyl.eternal-september.org> <20231112091106.817@kylheku.com> <uisfvu$gsmo$1@raubtier-asyl.eternal-september.org> <uisgpc$h32u$1@raubtier-asyl.eternal-september.org> <uiu26e$sper$1@dont-email.me> <uiv020$148s1$1@raubtier-asyl.eternal-september.org> <uiv050$1462e$1@dont-email.me> <uiv50o$14quu$1@raubtier-asyl.eternal-september.org>
Lines: 16
Message-ID: <WcM4N.53198$svP4.12968@fx12.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 14 Nov 2023 15:18:14 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 14 Nov 2023 15:18:14 GMT
X-Received-Bytes: 1660
 by: Scott Lurndal - Tue, 14 Nov 2023 15:18 UTC

Bonita Montero <Bonita.Montero@gmail.com> writes:
>Am 14.11.2023 um 06:21 schrieb Chris M. Thomasson:
>
>> You mean a word wrt the arch, or uint64_t on a 32-bit system?
>
>itemOutput first was a atomic_uint64_t and now is a uint64_t.
>The atomicwasn't necessary because itemOutput is accessed within
>a mutex access, i.e. it is surrounded with a lock() and unlock()
>which itself have a acquire and release behaviour, so I itemOutput
>doesn't need to be atomic.

In most commonly used architectures a 64-bit load is single-copy
atomic regardless of any external synchronization (e.g. a mutex,
spin-lock or semaphore).

Re: A Java- / .NET-like monitor

<uj04oh$19j9e$1@raubtier-asyl.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2648&group=comp.lang.c%2B%2B#2648

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 16:46:28 +0100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <uj04oh$19j9e$1@raubtier-asyl.eternal-september.org>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uipl56$3sugf$1@raubtier-asyl.eternal-september.org>
<20231111205536.387@kylheku.com>
<uiq7o0$1thb$1@raubtier-asyl.eternal-september.org>
<20231112091106.817@kylheku.com>
<uisfvu$gsmo$1@raubtier-asyl.eternal-september.org>
<uisgpc$h32u$1@raubtier-asyl.eternal-september.org>
<uiu26e$sper$1@dont-email.me>
<uiv020$148s1$1@raubtier-asyl.eternal-september.org>
<uiv050$1462e$1@dont-email.me>
<uiv50o$14quu$1@raubtier-asyl.eternal-september.org>
<WcM4N.53198$svP4.12968@fx12.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Nov 2023 15:46:25 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="638e4d8f863cffbb5f955914b4bbf384";
logging-data="1363246"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Gere7LRRbwjJNrR7OAGN8I+RnawtMyUk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:h0RKBjMzZr+GUZ3mt1AnLF7qEgM=
In-Reply-To: <WcM4N.53198$svP4.12968@fx12.iad>
Content-Language: de-DE
 by: Bonita Montero - Tue, 14 Nov 2023 15:46 UTC

Am 14.11.2023 um 16:18 schrieb Scott Lurndal:
> Bonita Montero <Bonita.Montero@gmail.com> writes:
>> Am 14.11.2023 um 06:21 schrieb Chris M. Thomasson:
>>
>>> You mean a word wrt the arch, or uint64_t on a 32-bit system?
>>
>> itemOutput first was a atomic_uint64_t and now is a uint64_t.
>> The atomicwasn't necessary because itemOutput is accessed within
>> a mutex access, i.e. it is surrounded with a lock() and unlock()
>> which itself have a acquire and release behaviour, so I itemOutput
>> doesn't need to be atomic.
>
> In most commonly used architectures a 64-bit load is single-copy
> atomic regardless of any external synchronization (e.g. a mutex,
> spin-lock or semaphore).

Maybe, but you can't rely on that. If you have a 32 bit platform
there's not always an easy way to have atomic 64 bit stores.

Re: A Java- / .NET-like monitor

<mZM4N.10239$rx%7.6902@fx47.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2649&group=comp.lang.c%2B%2B#2649

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx47.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: A Java- / .NET-like monitor
Newsgroups: comp.lang.c++
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org> <uiq7o0$1thb$1@raubtier-asyl.eternal-september.org> <20231112091106.817@kylheku.com> <uisfvu$gsmo$1@raubtier-asyl.eternal-september.org> <uisgpc$h32u$1@raubtier-asyl.eternal-september.org> <uiu26e$sper$1@dont-email.me> <uiv020$148s1$1@raubtier-asyl.eternal-september.org> <uiv050$1462e$1@dont-email.me> <uiv50o$14quu$1@raubtier-asyl.eternal-september.org> <WcM4N.53198$svP4.12968@fx12.iad> <uj04oh$19j9e$1@raubtier-asyl.eternal-september.org>
Lines: 29
Message-ID: <mZM4N.10239$rx%7.6902@fx47.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 14 Nov 2023 16:09:54 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 14 Nov 2023 16:09:54 GMT
X-Received-Bytes: 2145
 by: Scott Lurndal - Tue, 14 Nov 2023 16:09 UTC

Bonita Montero <Bonita.Montero@gmail.com> writes:
>Am 14.11.2023 um 16:18 schrieb Scott Lurndal:
>> Bonita Montero <Bonita.Montero@gmail.com> writes:
>>> Am 14.11.2023 um 06:21 schrieb Chris M. Thomasson:
>>>
>>>> You mean a word wrt the arch, or uint64_t on a 32-bit system?
>>>
>>> itemOutput first was a atomic_uint64_t and now is a uint64_t.
>>> The atomicwasn't necessary because itemOutput is accessed within
>>> a mutex access, i.e. it is surrounded with a lock() and unlock()
>>> which itself have a acquire and release behaviour, so I itemOutput
>>> doesn't need to be atomic.
>>
>> In most commonly used architectures a 64-bit load is single-copy
>> atomic regardless of any external synchronization (e.g. a mutex,
>> spin-lock or semaphore).
>
>Maybe, but you can't rely on that. If you have a 32 bit platform

32-bit platform is somewhat uncommon (outside of specialty microcontrollers
like the Cortex-M7).

I'm not aware of any 32-bit platform that supports 64-bit
accesses (other than via two 32-bit accesses).

With x86_64 and AArch64 you _can_ rely on it. And we do.

Re: A Java- / .NET-like monitor

<uj07v5$1a5g1$1@raubtier-asyl.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2650&group=comp.lang.c%2B%2B#2650

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 17:41:12 +0100
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <uj07v5$1a5g1$1@raubtier-asyl.eternal-september.org>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uiq7o0$1thb$1@raubtier-asyl.eternal-september.org>
<20231112091106.817@kylheku.com>
<uisfvu$gsmo$1@raubtier-asyl.eternal-september.org>
<uisgpc$h32u$1@raubtier-asyl.eternal-september.org>
<uiu26e$sper$1@dont-email.me>
<uiv020$148s1$1@raubtier-asyl.eternal-september.org>
<uiv050$1462e$1@dont-email.me>
<uiv50o$14quu$1@raubtier-asyl.eternal-september.org>
<WcM4N.53198$svP4.12968@fx12.iad>
<uj04oh$19j9e$1@raubtier-asyl.eternal-september.org>
<mZM4N.10239$rx%7.6902@fx47.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Nov 2023 16:41:09 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="638e4d8f863cffbb5f955914b4bbf384";
logging-data="1381889"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zOgSh1qI0LI5tbmNhb/unAnSHZeMDLXw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:GK+e4QjEoREjhau9pDXRX0ciPkI=
Content-Language: de-DE
In-Reply-To: <mZM4N.10239$rx%7.6902@fx47.iad>
 by: Bonita Montero - Tue, 14 Nov 2023 16:41 UTC

Am 14.11.2023 um 17:09 schrieb Scott Lurndal:

> I'm not aware of any 32-bit platform that supports 64-bit
> accesses (other than via two 32-bit accesses).

If I do a 64 bit atomic store with MSVC or clang-cl on a 32 bit
platform it stores the value in the stack, loads it with SSE and
stores it atomically.

Re: A Java- / .NET-like monitor

<uj0bgi$1aosr$1@raubtier-asyl.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2651&group=comp.lang.c%2B%2B#2651

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 18:41:41 +0100
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <uj0bgi$1aosr$1@raubtier-asyl.eternal-september.org>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uiq7o0$1thb$1@raubtier-asyl.eternal-september.org>
<20231112091106.817@kylheku.com>
<uisfvu$gsmo$1@raubtier-asyl.eternal-september.org>
<uisgpc$h32u$1@raubtier-asyl.eternal-september.org>
<uiu26e$sper$1@dont-email.me>
<uiv020$148s1$1@raubtier-asyl.eternal-september.org>
<uiv050$1462e$1@dont-email.me>
<uiv50o$14quu$1@raubtier-asyl.eternal-september.org>
<WcM4N.53198$svP4.12968@fx12.iad>
<uj04oh$19j9e$1@raubtier-asyl.eternal-september.org>
<mZM4N.10239$rx%7.6902@fx47.iad>
<uj07v5$1a5g1$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Nov 2023 17:41:38 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="638e4d8f863cffbb5f955914b4bbf384";
logging-data="1401755"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FggANYYylhCGbBby/3/bAazfkorS7yts="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Om4P2nXh19a49vdm22VIwAvMnDE=
In-Reply-To: <uj07v5$1a5g1$1@raubtier-asyl.eternal-september.org>
Content-Language: de-DE
 by: Bonita Montero - Tue, 14 Nov 2023 17:41 UTC

Am 14.11.2023 um 17:41 schrieb Bonita Montero:

> If I do a 64 bit atomic store with MSVC or clang-cl on a 32 bit
> platform it stores the value in the stack, loads it with SSE and
> stores it atomically.

I just asked myself what MSVC does if I have a 64 bit atomic store
and I compile with -arch:IA32, i.e. without SSE. I compiled the
following function:

#include <atomic>

using namespace std;

void fn( atomic_uint64_t &a, uint64_t v )
{ a.store( v, memory_order_relaxed );
}

This is the generated code:

?fn@@YAXAAU?$atomic@_K@std@@_K@Z PROC
mov eax, DWORD PTR _v$[esp-4]
mov ecx, DWORD PTR _v$[esp]
mov DWORD PTR tv135[esp-4], eax
mov eax, DWORD PTR _a$[esp-4]
mov DWORD PTR tv135[esp], ecx
fild QWORD PTR tv135[esp-4]
fistp QWORD PTR [eax]
ret 0
?fn@@YAXAAU?$atomic@_K@std@@_K@Z ENDP

Interestingly the resulting temporary floating point value isn't
chopped according to the set precision in the x87 FPU control word,
so we have all of the 64 bits inside the mantissa, of course with
a shift.

Re: A Java- / .NET-like monitor

<uj0l38$1ch3f$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2652&group=comp.lang.c%2B%2B#2652

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 12:25:11 -0800
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <uj0l38$1ch3f$1@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uiq7o0$1thb$1@raubtier-asyl.eternal-september.org>
<20231112091106.817@kylheku.com>
<uisfvu$gsmo$1@raubtier-asyl.eternal-september.org>
<uisgpc$h32u$1@raubtier-asyl.eternal-september.org>
<uiu26e$sper$1@dont-email.me>
<uiv020$148s1$1@raubtier-asyl.eternal-september.org>
<uiv050$1462e$1@dont-email.me>
<uiv50o$14quu$1@raubtier-asyl.eternal-september.org>
<WcM4N.53198$svP4.12968@fx12.iad>
<uj04oh$19j9e$1@raubtier-asyl.eternal-september.org>
<mZM4N.10239$rx%7.6902@fx47.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Nov 2023 20:25:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b2b7e169255d8eb4f38ce399d6fe008";
logging-data="1459311"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/e67Zq+U/95jEvDAzSpH2jVqjlePtRdAQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:yW7/T/aoA1wXiTNXYRrlbgBluo8=
In-Reply-To: <mZM4N.10239$rx%7.6902@fx47.iad>
Content-Language: en-US
 by: Chris M. Thomasson - Tue, 14 Nov 2023 20:25 UTC

On 11/14/2023 8:09 AM, Scott Lurndal wrote:
> Bonita Montero <Bonita.Montero@gmail.com> writes:
>> Am 14.11.2023 um 16:18 schrieb Scott Lurndal:
>>> Bonita Montero <Bonita.Montero@gmail.com> writes:
>>>> Am 14.11.2023 um 06:21 schrieb Chris M. Thomasson:
>>>>
>>>>> You mean a word wrt the arch, or uint64_t on a 32-bit system?
>>>>
>>>> itemOutput first was a atomic_uint64_t and now is a uint64_t.
>>>> The atomicwasn't necessary because itemOutput is accessed within
>>>> a mutex access, i.e. it is surrounded with a lock() and unlock()
>>>> which itself have a acquire and release behaviour, so I itemOutput
>>>> doesn't need to be atomic.
>>>
>>> In most commonly used architectures a 64-bit load is single-copy
>>> atomic regardless of any external synchronization (e.g. a mutex,
>>> spin-lock or semaphore).
>>
>> Maybe, but you can't rely on that. If you have a 32 bit platform
>
> 32-bit platform is somewhat uncommon (outside of specialty microcontrollers
> like the Cortex-M7).
>
> I'm not aware of any 32-bit platform that supports 64-bit
> accesses (other than via two 32-bit accesses).

Well, we have cmpxchg8b on 32-bit Intel...

>
> With x86_64 and AArch64 you _can_ rely on it. And we do.
>
>
>

Re: A Java- / .NET-like monitor

<uj0l74$1ch3e$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2653&group=comp.lang.c%2B%2B#2653

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 12:27:16 -0800
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <uj0l74$1ch3e$1@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uinloo$3d813$1@raubtier-asyl.eternal-september.org>
<uio76q$3gj34$1@raubtier-asyl.eternal-september.org>
<uiolf0$3j4r2$3@dont-email.me>
<uipl0g$3su3r$1@raubtier-asyl.eternal-september.org>
<uirdja$7lqi$1@dont-email.me>
<uivd74$15vdk$1@raubtier-asyl.eternal-september.org>
<uive6t$163u2$2@dont-email.me>
<uivgf2$16drp$1@raubtier-asyl.eternal-september.org>
<uivgu9$16cth$1@dont-email.me>
<uivhqg$16kjm$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Nov 2023 20:27:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b2b7e169255d8eb4f38ce399d6fe008";
logging-data="1459310"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/BjbEHEJMmwthRgAYMPKvo5eYRCgvjVMw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:gIN7zCnQNSGxcnVvNlcYfIuMdS4=
Content-Language: en-US
In-Reply-To: <uivhqg$16kjm$1@raubtier-asyl.eternal-september.org>
 by: Chris M. Thomasson - Tue, 14 Nov 2023 20:27 UTC

On 11/14/2023 2:23 AM, Bonita Montero wrote:
> Am 14.11.2023 um 11:08 schrieb Chris M. Thomasson:
>
>> So, you are finished with any future on the fly corrections, right?
>
> I'm currently not missing anything with the code.

Okay, can you please make a new post that contains the finished code?

Thanks.

Re: A Java- / .NET-like monitor

<uj0lb4$1ch3f$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2654&group=comp.lang.c%2B%2B#2654

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 12:29:23 -0800
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <uj0lb4$1ch3f$2@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uinloo$3d813$1@raubtier-asyl.eternal-september.org>
<uio76q$3gj34$1@raubtier-asyl.eternal-september.org>
<uiolf0$3j4r2$3@dont-email.me>
<uipl0g$3su3r$1@raubtier-asyl.eternal-september.org>
<uirdja$7lqi$1@dont-email.me>
<uivd74$15vdk$1@raubtier-asyl.eternal-september.org>
<uive6t$163u2$2@dont-email.me>
<uivgf2$16drp$1@raubtier-asyl.eternal-september.org>
<uivgu9$16cth$1@dont-email.me>
<uivhqg$16kjm$1@raubtier-asyl.eternal-september.org>
<uj0l74$1ch3e$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 14 Nov 2023 20:29:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b2b7e169255d8eb4f38ce399d6fe008";
logging-data="1459311"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18e2ekeboqyQV/Bk9uDNo8z6FqIPAxvRu8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:tQV7lSTH6aOy0hwiU30mMvs14mQ=
Content-Language: en-US
In-Reply-To: <uj0l74$1ch3e$1@dont-email.me>
 by: Chris M. Thomasson - Tue, 14 Nov 2023 20:29 UTC

On 11/14/2023 12:27 PM, Chris M. Thomasson wrote:
> On 11/14/2023 2:23 AM, Bonita Montero wrote:
>> Am 14.11.2023 um 11:08 schrieb Chris M. Thomasson:
>>
>>> So, you are finished with any future on the fly corrections, right?
>>
>> I'm currently not missing anything with the code.
>
> Okay, can you please make a new post that contains the finished code?
>
> Thanks.

Brand new thread:

Bonita Monitor, Fin...

Show the code, an I will work with that. Okay?

Re: A Java- / .NET-like monitor

<uj0s5f$1dimg$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2655&group=comp.lang.c%2B%2B#2655

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 14 Nov 2023 14:25:50 -0800
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <uj0s5f$1dimg$1@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uiq7o0$1thb$1@raubtier-asyl.eternal-september.org>
<20231112091106.817@kylheku.com>
<uisfvu$gsmo$1@raubtier-asyl.eternal-september.org>
<uisgpc$h32u$1@raubtier-asyl.eternal-september.org>
<uiu26e$sper$1@dont-email.me>
<uiv020$148s1$1@raubtier-asyl.eternal-september.org>
<uiv050$1462e$1@dont-email.me>
<uiv50o$14quu$1@raubtier-asyl.eternal-september.org>
<WcM4N.53198$svP4.12968@fx12.iad>
<uj04oh$19j9e$1@raubtier-asyl.eternal-september.org>
<mZM4N.10239$rx%7.6902@fx47.iad> <uj0l38$1ch3f$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 14 Nov 2023 22:25:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6b2b7e169255d8eb4f38ce399d6fe008";
logging-data="1493712"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+nr0OjZPizhApe8PYMtIH/F91J8zEHUAw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Cd0OzG7vQMid9HAIYvtDe0ug2cI=
Content-Language: en-US
In-Reply-To: <uj0l38$1ch3f$1@dont-email.me>
 by: Chris M. Thomasson - Tue, 14 Nov 2023 22:25 UTC

On 11/14/2023 12:25 PM, Chris M. Thomasson wrote:
> On 11/14/2023 8:09 AM, Scott Lurndal wrote:
>> Bonita Montero <Bonita.Montero@gmail.com> writes:
>>> Am 14.11.2023 um 16:18 schrieb Scott Lurndal:
>>>> Bonita Montero <Bonita.Montero@gmail.com> writes:
>>>>> Am 14.11.2023 um 06:21 schrieb Chris M. Thomasson:
>>>>>
>>>>>> You mean a word wrt the arch, or uint64_t on a 32-bit system?
>>>>>
>>>>> itemOutput first was a atomic_uint64_t and now is a uint64_t.
>>>>> The atomicwasn't necessary because itemOutput is accessed within
>>>>> a mutex access, i.e. it is surrounded with a lock() and unlock()
>>>>> which itself have a acquire and release behaviour, so I itemOutput
>>>>> doesn't need to be atomic.
>>>>
>>>> In most commonly used architectures a 64-bit load is single-copy
>>>> atomic regardless of any external synchronization (e.g. a mutex,
>>>> spin-lock or semaphore).
>>>
>>> Maybe, but you can't rely on that. If you have a 32 bit platform
>>
>>   32-bit platform is somewhat uncommon (outside of specialty
>> microcontrollers
>> like the Cortex-M7).
>>
>>   I'm not aware of any 32-bit platform that supports 64-bit
>> accesses (other than via two 32-bit accesses).
>
> Well, we have cmpxchg8b on 32-bit Intel...

Also, check this out:

https://groups.google.com/g/comp.lang.asm.x86/c/FScbTaQEYLc

:^)

>
>>
>>   With x86_64 and AArch64 you _can_ rely on it.   And we do.
>>
>>
>>
>

Re: A Java- / .NET-like monitor

<7RS4N.25534$Ee89.22323@fx17.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2656&group=comp.lang.c%2B%2B#2656

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: A Java- / .NET-like monitor
Newsgroups: comp.lang.c++
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org> <uisfvu$gsmo$1@raubtier-asyl.eternal-september.org> <uisgpc$h32u$1@raubtier-asyl.eternal-september.org> <uiu26e$sper$1@dont-email.me> <uiv020$148s1$1@raubtier-asyl.eternal-september.org> <uiv050$1462e$1@dont-email.me> <uiv50o$14quu$1@raubtier-asyl.eternal-september.org> <WcM4N.53198$svP4.12968@fx12.iad> <uj04oh$19j9e$1@raubtier-asyl.eternal-september.org> <mZM4N.10239$rx%7.6902@fx47.iad> <uj0l38$1ch3f$1@dont-email.me>
Lines: 36
Message-ID: <7RS4N.25534$Ee89.22323@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Tue, 14 Nov 2023 22:50:43 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Tue, 14 Nov 2023 22:50:43 GMT
X-Received-Bytes: 2524
 by: Scott Lurndal - Tue, 14 Nov 2023 22:50 UTC

"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
>On 11/14/2023 8:09 AM, Scott Lurndal wrote:
>> Bonita Montero <Bonita.Montero@gmail.com> writes:
>>> Am 14.11.2023 um 16:18 schrieb Scott Lurndal:
>>>> Bonita Montero <Bonita.Montero@gmail.com> writes:
>>>>> Am 14.11.2023 um 06:21 schrieb Chris M. Thomasson:
>>>>>
>>>>>> You mean a word wrt the arch, or uint64_t on a 32-bit system?
>>>>>
>>>>> itemOutput first was a atomic_uint64_t and now is a uint64_t.
>>>>> The atomicwasn't necessary because itemOutput is accessed within
>>>>> a mutex access, i.e. it is surrounded with a lock() and unlock()
>>>>> which itself have a acquire and release behaviour, so I itemOutput
>>>>> doesn't need to be atomic.
>>>>
>>>> In most commonly used architectures a 64-bit load is single-copy
>>>> atomic regardless of any external synchronization (e.g. a mutex,
>>>> spin-lock or semaphore).
>>>
>>> Maybe, but you can't rely on that. If you have a 32 bit platform
>>
>> 32-bit platform is somewhat uncommon (outside of specialty microcontrollers
>> like the Cortex-M7).
>>
>> I'm not aware of any 32-bit platform that supports 64-bit
>> accesses (other than via two 32-bit accesses).
>
>Well, we have cmpxchg8b on 32-bit Intel...

For which a single-copy atomic semantic property is implicit
in the operation.

As BM pointed out, once SSE et al showed up, there was a way to
do some 64-bit loads. Not sure they're architecturally
required to be single-copy atomic, however.

Re: A Java- / .NET-like monitor

<97V4N.19464$Wzw6.11650@fx13.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2658&group=comp.lang.c%2B%2B#2658

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx13.iad.POSTED!not-for-mail
Subject: Re: A Java- / .NET-like monitor
Newsgroups: comp.lang.c++
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<20231108152102.495@kylheku.com>
<uihnei$21tq7$1@raubtier-asyl.eternal-september.org>
<uihnkd$21rae$1@dont-email.me>
<uihnnm$21tq7$5@raubtier-asyl.eternal-september.org>
<uihnup$21rab$4@dont-email.me>
<uihpgl$227kv$1@raubtier-asyl.eternal-september.org>
<nuT3N.20309$wvv7.18517@fx14.iad>
<uipl56$3sugf$1@raubtier-asyl.eternal-september.org>
<20231111205536.387@kylheku.com>
<uiq7o0$1thb$1@raubtier-asyl.eternal-september.org>
<Pi84N.104$ayBd.46@fx07.iad> <b9e4N.20671$Ee89.15587@fx17.iad>
<20231112204849.10@kylheku.com> <euB4N.6863$%p%e.3900@fx43.iad>
<20231113192822.953@kylheku.com>
From: pauldontspamtolk@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
MIME-Version: 1.0
In-Reply-To: <20231113192822.953@kylheku.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 25
Message-ID: <97V4N.19464$Wzw6.11650@fx13.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 15 Nov 2023 01:26:29 UTC
Date: Tue, 14 Nov 2023 20:26:22 -0500
X-Received-Bytes: 2698
 by: Pavel - Wed, 15 Nov 2023 01:26 UTC

Kaz Kylheku wrote:
> On 2023-11-14, Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo> wrote:
>> Kaz Kylheku wrote:
>>> Because of the situation that the thread which was signaled is
>>> trying to acquire the mutex, which, stupidly, the signaling thread
>>> is still holding. So, oops, back it goes into suspended state, and we
>>> have to context switch to the mutex holder which has to release the
>>> mutex and then switch to that signaled thread again.
>>>
>> Please see my response to your other post. "as-if" calling of
>> pthread_mutex_lock does not prescribe actually calling it. Nothing in
>> the standard prevents pthread_cond_signal from doing all the job of
>> stuffing the unblocked threads to the mutex waiting list in accordance
>> with some scheduling policy.
>
> Have you noticed how no mutex appears in the pthread_cond_signal API?
>
Of course but so what? Nothing prevents the implementation from listing
the temporarily released mutices of the waiting pthread_cond_wait
callers in the cond var where pthread_cond_signal can access them.

Or, possibly even better, keeping a pointer to them with the threads
waiting for the condvar (there can only be at most one such temporarily
released mutex per the waiting thread). And the threads waiting for the
condvar are accessible for the pthread_cond_signal according to the spec.

Re: A Java- / .NET-like monitor

<rfV4N.60714$wvv7.23203@fx14.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2659&group=comp.lang.c%2B%2B#2659

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail
Subject: Re: A Java- / .NET-like monitor
Newsgroups: comp.lang.c++
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uihnei$21tq7$1@raubtier-asyl.eternal-september.org>
<uihnkd$21rae$1@dont-email.me>
<uihnnm$21tq7$5@raubtier-asyl.eternal-september.org>
<uihnup$21rab$4@dont-email.me>
<uihpgl$227kv$1@raubtier-asyl.eternal-september.org>
<nuT3N.20309$wvv7.18517@fx14.iad>
<uipl56$3sugf$1@raubtier-asyl.eternal-september.org>
<20231111205536.387@kylheku.com> <E5e4N.6986$Ubzd.3639@fx36.iad>
<20231112203949.483@kylheku.com> <_WA4N.30669$_Oab.744@fx15.iad>
<v7M4N.53197$svP4.45558@fx12.iad>
From: pauldontspamtolk@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
MIME-Version: 1.0
In-Reply-To: <v7M4N.53197$svP4.45558@fx12.iad>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 59
Message-ID: <rfV4N.60714$wvv7.23203@fx14.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 15 Nov 2023 01:35:19 UTC
Date: Tue, 14 Nov 2023 20:35:18 -0500
X-Received-Bytes: 4278
 by: Pavel - Wed, 15 Nov 2023 01:35 UTC

Scott Lurndal wrote:
> Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo> writes:
>> Kaz Kylheku wrote:
>>> On 2023-11-13, Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo> wrote:
>>>> Kaz Kylheku wrote:
>>>>> If you're using POSIX mutexes and conditions, you should call
>>>>> pthread_cond_signal and pthread_cond_broadcast outside of the mutex,
>>>>> whenever possible.
>>>> This is recommended against by the standard for the same reason why Java
>>>> implements Hoare monitor behavior. Citation:
>>>>
>>>> "
>>>> The pthread_cond_broadcast() or pthread_cond_signal() functions may be
>>>> called by a thread whether or not it currently owns the mutex that
>>>> threads calling pthread_cond_wait() or pthread_cond_timedwait() have
>>>> associated with the condition variable during their waits; however, if
>>>> predictable scheduling behavior is required, then that mutex shall be
>>>> locked by the thread calling pthread_cond_broadcast() or
>>>> pthread_cond_signal().
>>>> "
>>>
>>> But that text is stupid/defective, because you will not actually get
>>> predictable scheduling behavior just by doing that.
>>
>> This is POSIX text that IIRC was a compromise with real-time (RT) guys.
>> Java has thread priorities so it is formally relevant (could be relevant
>> in some implementations, too; did not really check). RT guys don't like
>> condvars in principle as they are a "gateway drug" to all kinds of prio
>> inversions so this was a compromise that permitted the condvar to get to
>> POSIX. The meaning of the spec is to prevent priority inversion when
>> running on one CPU. An example problematic scenario is as follows:
>>
>> 1. Higher-prio thread A grabs mutex and starts waiting for an event
>> (say, posted to a queue that's currently empty). The mutex is released
>> at this time to allow posting the event (the standard behavior of
>> pthread_cond_wait()).
>> 2. Now that the A is not runnable, a lower-prio thread B can also run
>> and suppose it also wants event from same queue.
>> 3. Thread C grabs mutex, posts event to the queue, releases the mutex
>> 4. Before thread C manages to signal the condvar (and by that wake up
>> thread A), thread B grabs the lock and steals the event. Higher-prio
>> thread A stays waiting for the event -- which is what RT guys hate.
>>
>> With the behavior recommended by the standard, thread C will first
>> notify condvar, by that making thread A runnable and thread A will grab
>> the event.
>
> Clearly the application should have used a queue per priority in
> this case.
This has been an alternative for a while but traditionally RT is built
on the threads of different prios as opposed to the resources of
different prios.

There are reasons for this, too: one I remember is that the ordering
becomes better defined. (Just as an example, imagine that the events
posted on the queue are work permits of some kind. The policy is that
while higher-prio thread is waiting for a work permit, no lower-prio
thread shall get a permit).

Re: A Java- / .NET-like monitor

<0mV4N.683$%d2c.644@fx08.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2660&group=comp.lang.c%2B%2B#2660

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx08.iad.POSTED!not-for-mail
Subject: Re: A Java- / .NET-like monitor
Newsgroups: comp.lang.c++
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<20231108100351.347@kylheku.com>
<uigk5o$1nmku$1@raubtier-asyl.eternal-september.org>
<20231108114723.256@kylheku.com>
<uigp4n$1onpc$1@raubtier-asyl.eternal-september.org>
<20231108152102.495@kylheku.com>
<uihnei$21tq7$1@raubtier-asyl.eternal-september.org>
<uihnkd$21rae$1@dont-email.me>
<uihnnm$21tq7$5@raubtier-asyl.eternal-september.org>
<uihnup$21rab$4@dont-email.me>
<uihpgl$227kv$1@raubtier-asyl.eternal-september.org>
<nuT3N.20309$wvv7.18517@fx14.iad>
<uipl56$3sugf$1@raubtier-asyl.eternal-september.org>
<20231111205536.387@kylheku.com> <E5e4N.6986$Ubzd.3639@fx36.iad>
<20231112203949.483@kylheku.com> <6nB4N.2145$qqwd.2132@fx42.iad>
<20231113191446.974@kylheku.com>
From: pauldontspamtolk@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
MIME-Version: 1.0
In-Reply-To: <20231113191446.974@kylheku.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 17
Message-ID: <0mV4N.683$%d2c.644@fx08.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 15 Nov 2023 01:42:20 UTC
Date: Tue, 14 Nov 2023 20:42:20 -0500
X-Received-Bytes: 2330
 by: Pavel - Wed, 15 Nov 2023 01:42 UTC

Kaz Kylheku wrote:
> On 2023-11-14, Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo> wrote:
>> "as-if" and "according to the scheduling policy (if applicable)" here
>> are important. The standard intent may be to permit only the threads
>> that are "unblocked" contend for the mutex -- as opposed to all
>> non-blocked threads.
>
> It's possible that only one thread is unblocked by a
> pthread_cond_signal. It takes at least two parties to contend for
> something.
>
My point was that the "unblocked" thread could be the thread that "won"
the contention. "as-if" there meant that the threads didn't really need
to be all woken up / unblocked and start contending; but the contention
could be resolved according to the scheduling policy (the same one that
would be applied if they were actually running and contending for the
mutex, without any waiting for the condvar) within the signal call.

Re: A Java- / .NET-like monitor

<MqV4N.60715$wvv7.6028@fx14.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2661&group=comp.lang.c%2B%2B#2661

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail
Subject: Re: A Java- / .NET-like monitor
Newsgroups: comp.lang.c++
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<20231108100351.347@kylheku.com>
<uigk5o$1nmku$1@raubtier-asyl.eternal-september.org>
<20231108114723.256@kylheku.com>
<uigp4n$1onpc$1@raubtier-asyl.eternal-september.org>
<20231108152102.495@kylheku.com>
<uihnei$21tq7$1@raubtier-asyl.eternal-september.org>
<uihnkd$21rae$1@dont-email.me>
<uihnnm$21tq7$5@raubtier-asyl.eternal-september.org>
<uihnup$21rab$4@dont-email.me>
<uihpgl$227kv$1@raubtier-asyl.eternal-september.org>
<nuT3N.20309$wvv7.18517@fx14.iad>
<uipl56$3sugf$1@raubtier-asyl.eternal-september.org>
<20231111205536.387@kylheku.com> <E5e4N.6986$Ubzd.3639@fx36.iad>
<20231112203949.483@kylheku.com> <6nB4N.2145$qqwd.2132@fx42.iad>
<20231113191446.974@kylheku.com> <uiv0ib$149hi$1@dont-email.me>
<uiv0k9$149hi$2@dont-email.me>
From: pauldontspamtolk@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
MIME-Version: 1.0
In-Reply-To: <uiv0k9$149hi$2@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 28
Message-ID: <MqV4N.60715$wvv7.6028@fx14.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 15 Nov 2023 01:47:24 UTC
Date: Tue, 14 Nov 2023 20:47:24 -0500
X-Received-Bytes: 2644
 by: Pavel - Wed, 15 Nov 2023 01:47 UTC

Chris M. Thomasson wrote:
> On 11/13/2023 9:28 PM, Chris M. Thomasson wrote:
>> On 11/13/2023 7:27 PM, Kaz Kylheku wrote:
>>> On 2023-11-14, Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo>
>>> wrote:
>>>> "as-if" and "according to the scheduling policy (if applicable)" here
>>>> are important. The standard intent may be to permit only the threads
>>>> that are "unblocked" contend for the mutex -- as opposed to all
>>>> non-blocked threads.
>>>
>>> It's possible that only one thread is unblocked by a
>>> pthread_cond_signal. It takes at least two parties to contend for
>>> something.
>>>
>>
>> A signalling thread does its thing while holding the mutex... Well, it
>> hears the following playing in the background:
>>
>> https://youtu.be/7YvAYIJSSZY
>
> A condvar that cannot signal/broadcast from outside of a held mutex is
> broken by default.
It can, it's just that the desired scheduling policy cannot be
*effectively* applied if a program signal outside of that mutex.

E.g. in some scenario a higher-prio thread could stay indefinitely
starved by the lower-prio thread, regardless of the thread library
implementation.

Re: A Java- / .NET-like monitor

<pMV4N.7286$pgLd.6741@fx05.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2662&group=comp.lang.c%2B%2B#2662

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!rocksolid2!news.neodome.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx05.iad.POSTED!not-for-mail
Subject: Re: A Java- / .NET-like monitor
Newsgroups: comp.lang.c++
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<20231108100351.347@kylheku.com>
<uigk5o$1nmku$1@raubtier-asyl.eternal-september.org>
<20231108114723.256@kylheku.com>
<uigp4n$1onpc$1@raubtier-asyl.eternal-september.org>
<20231108152102.495@kylheku.com>
<uihnei$21tq7$1@raubtier-asyl.eternal-september.org>
<uihnkd$21rae$1@dont-email.me>
<uihnnm$21tq7$5@raubtier-asyl.eternal-september.org>
<uihnup$21rab$4@dont-email.me>
<uihpgl$227kv$1@raubtier-asyl.eternal-september.org>
<uihpmf$228mv$1@dont-email.me>
<uihq1g$2290l$1@raubtier-asyl.eternal-september.org>
<uihr3u$228mv$11@dont-email.me>
<uihram$22gqs$1@raubtier-asyl.eternal-september.org>
<uihrd6$228mv$13@dont-email.me>
<uihrg6$22hup$1@raubtier-asyl.eternal-september.org>
<uihrj7$228mv$16@dont-email.me>
<uihrm2$22ioe$1@raubtier-asyl.eternal-september.org>
<uihrqr$228mv$19@dont-email.me>
<uihs34$22jil$2@raubtier-asyl.eternal-september.org>
From: pauldontspamtolk@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
MIME-Version: 1.0
In-Reply-To: <uihs34$22jil$2@raubtier-asyl.eternal-september.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 20
Message-ID: <pMV4N.7286$pgLd.6741@fx05.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 15 Nov 2023 02:10:29 UTC
Date: Tue, 14 Nov 2023 21:10:29 -0500
X-Received-Bytes: 2522
 by: Pavel - Wed, 15 Nov 2023 02:10 UTC

Bonita Montero wrote:
> Am 09.11.2023 um 06:48 schrieb Chris M. Thomasson:
>> On 11/8/2023 9:45 PM, Bonita Montero wrote:
>>> Am 09.11.2023 um 06:44 schrieb Chris M. Thomasson:
>>>
>>>> Wait morphing is not in the realm of the compiler. It's in the kernel.
>>>
>>> Read this:
>>> https://stackoverflow.com/questions/45163701/which-os-platforms-implement-wait-morphing-optimization
>>>
>>
>> Wait morphing can be highly beneficial.
>
> Wait morphing isn't necessary under Win32 since you can wait
> for the mutexe's binary semaphore and for the condvar's counting
> semaphore in one step with WaitForMultipleObjects. Unfortunately
> there's nothing under Linux like that.
>
Not true. A Linux program can wait for any number of eventfd semaphores
that can be used as either binary or a counting one.

Re: A Java- / .NET-like monitor

<uj1ium$1kad4$1@raubtier-asyl.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2663&group=comp.lang.c%2B%2B#2663

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Wed, 15 Nov 2023 05:54:49 +0100
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uj1ium$1kad4$1@raubtier-asyl.eternal-september.org>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uinloo$3d813$1@raubtier-asyl.eternal-september.org>
<uio76q$3gj34$1@raubtier-asyl.eternal-september.org>
<uiolf0$3j4r2$3@dont-email.me>
<uipl0g$3su3r$1@raubtier-asyl.eternal-september.org>
<uirdja$7lqi$1@dont-email.me>
<uivd74$15vdk$1@raubtier-asyl.eternal-september.org>
<uive6t$163u2$2@dont-email.me>
<uivgf2$16drp$1@raubtier-asyl.eternal-september.org>
<uivgu9$16cth$1@dont-email.me>
<uivhqg$16kjm$1@raubtier-asyl.eternal-september.org>
<uj0l74$1ch3e$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 15 Nov 2023 04:54:46 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="3ae09f37c89a3994a5c3c5993a6a60f0";
logging-data="1714596"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6Al2ue0LGHlMpm48i0LY9Bm8KHwhMH/o="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Vhsx/wmXPLBAv2dJkmiTNzD9qGM=
In-Reply-To: <uj0l74$1ch3e$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Wed, 15 Nov 2023 04:54 UTC

Am 14.11.2023 um 21:27 schrieb Chris M. Thomasson:
> On 11/14/2023 2:23 AM, Bonita Montero wrote:
>> Am 14.11.2023 um 11:08 schrieb Chris M. Thomasson:
>>
>>> So, you are finished with any future on the fly corrections, right?
>>
>> I'm currently not missing anything with the code.
>
> Okay, can you please make a new post that contains the finished code?

I already posted the finished code in two parts with this little
correction (missing "!"). The xhandle.h is still the same.

Re: A Java- / .NET-like monitor

<uj1j2q$1kad4$2@raubtier-asyl.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2664&group=comp.lang.c%2B%2B#2664

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Wed, 15 Nov 2023 05:57:01 +0100
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <uj1j2q$1kad4$2@raubtier-asyl.eternal-september.org>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uiq7o0$1thb$1@raubtier-asyl.eternal-september.org>
<20231112091106.817@kylheku.com>
<uisfvu$gsmo$1@raubtier-asyl.eternal-september.org>
<uisgpc$h32u$1@raubtier-asyl.eternal-september.org>
<uiu26e$sper$1@dont-email.me>
<uiv020$148s1$1@raubtier-asyl.eternal-september.org>
<uiv050$1462e$1@dont-email.me>
<uiv50o$14quu$1@raubtier-asyl.eternal-september.org>
<WcM4N.53198$svP4.12968@fx12.iad>
<uj04oh$19j9e$1@raubtier-asyl.eternal-september.org>
<mZM4N.10239$rx%7.6902@fx47.iad> <uj0l38$1ch3f$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 15 Nov 2023 04:56:58 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="3ae09f37c89a3994a5c3c5993a6a60f0";
logging-data="1714596"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lEJAfgtT5DqwP9Vi1CfZsdN9d2d91B1I="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:2bIpg12C4E9l4PgTCuj+0cLm02g=
Content-Language: de-DE
In-Reply-To: <uj0l38$1ch3f$1@dont-email.me>
 by: Bonita Montero - Wed, 15 Nov 2023 04:57 UTC

Am 14.11.2023 um 21:25 schrieb Chris M. Thomasson:

> Well, we have cmpxchg8b on 32-bit Intel...

That's what I also thought, i.e. you can make a 64 bit store with that.
But that's for sure much slower than the trick with the x87-FPU I've
shown.

Re: A Java- / .NET-like monitor

<uj1jli$1kdmu$1@raubtier-asyl.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2665&group=comp.lang.c%2B%2B#2665

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Wed, 15 Nov 2023 06:07:01 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <uj1jli$1kdmu$1@raubtier-asyl.eternal-september.org>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<20231108100351.347@kylheku.com>
<uigk5o$1nmku$1@raubtier-asyl.eternal-september.org>
<20231108114723.256@kylheku.com>
<uigp4n$1onpc$1@raubtier-asyl.eternal-september.org>
<20231108152102.495@kylheku.com>
<uihnei$21tq7$1@raubtier-asyl.eternal-september.org>
<uihnkd$21rae$1@dont-email.me>
<uihnnm$21tq7$5@raubtier-asyl.eternal-september.org>
<uihnup$21rab$4@dont-email.me>
<uihpgl$227kv$1@raubtier-asyl.eternal-september.org>
<uihpmf$228mv$1@dont-email.me>
<uihq1g$2290l$1@raubtier-asyl.eternal-september.org>
<uihr3u$228mv$11@dont-email.me>
<uihram$22gqs$1@raubtier-asyl.eternal-september.org>
<uihrd6$228mv$13@dont-email.me>
<uihrg6$22hup$1@raubtier-asyl.eternal-september.org>
<uihrj7$228mv$16@dont-email.me>
<uihrm2$22ioe$1@raubtier-asyl.eternal-september.org>
<uihrqr$228mv$19@dont-email.me>
<uihs34$22jil$2@raubtier-asyl.eternal-september.org>
<pMV4N.7286$pgLd.6741@fx05.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 15 Nov 2023 05:06:58 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="3ae09f37c89a3994a5c3c5993a6a60f0";
logging-data="1717982"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mhupSNKOw2bcvz/flChAAFugWsnUo/Eg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:qVQcF1xsU/x/buuSjFIfDGN5CO8=
Content-Language: de-DE
In-Reply-To: <pMV4N.7286$pgLd.6741@fx05.iad>
 by: Bonita Montero - Wed, 15 Nov 2023 05:07 UTC

Am 15.11.2023 um 03:10 schrieb Pavel:
> Bonita Montero wrote:
>> Am 09.11.2023 um 06:48 schrieb Chris M. Thomasson:
>>> On 11/8/2023 9:45 PM, Bonita Montero wrote:
>>>> Am 09.11.2023 um 06:44 schrieb Chris M. Thomasson:
>>>>
>>>>> Wait morphing is not in the realm of the compiler. It's in the kernel.
>>>>
>>>> Read this:
>>>> https://stackoverflow.com/questions/45163701/which-os-platforms-implement-wait-morphing-optimization
>>>
>>> Wait morphing can be highly beneficial.
>>
>> Wait morphing isn't necessary under Win32 since you can wait
>> for the mutexe's binary semaphore and for the condvar's counting
>> semaphore in one step with WaitForMultipleObjects. Unfortunately
>> there's nothing under Linux like that.
>>
> Not true. A Linux program can wait for any number of eventfd semaphores
> that can be used as either binary or a counting one.

An eventfd can be a semaphore, but only one semaphore and not a set
like SysV semaphores. You can wait for multiple semaphores with poll
or select, but a change on one semaphore releases the waiting thread
whereas with Win32 you can wait for all conditions to be met at once.

Re: A Java- / .NET-like monitor

<uj38do$1skku$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2666&group=comp.lang.c%2B%2B#2666

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Wed, 15 Nov 2023 12:07:20 -0800
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <uj38do$1skku$1@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uisfvu$gsmo$1@raubtier-asyl.eternal-september.org>
<uisgpc$h32u$1@raubtier-asyl.eternal-september.org>
<uiu26e$sper$1@dont-email.me>
<uiv020$148s1$1@raubtier-asyl.eternal-september.org>
<uiv050$1462e$1@dont-email.me>
<uiv50o$14quu$1@raubtier-asyl.eternal-september.org>
<WcM4N.53198$svP4.12968@fx12.iad>
<uj04oh$19j9e$1@raubtier-asyl.eternal-september.org>
<mZM4N.10239$rx%7.6902@fx47.iad> <uj0l38$1ch3f$1@dont-email.me>
<7RS4N.25534$Ee89.22323@fx17.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 15 Nov 2023 20:07:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c1eb1e7d2816baa503f549a694bca0e3";
logging-data="1987230"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dv2ZI8cSB91j9Ro/qmVnhsBnX/o8eJ1Y="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:LqomnG98KG/RVvqJs86WLFIWFds=
Content-Language: en-US
In-Reply-To: <7RS4N.25534$Ee89.22323@fx17.iad>
 by: Chris M. Thomasson - Wed, 15 Nov 2023 20:07 UTC

On 11/14/2023 2:50 PM, Scott Lurndal wrote:
> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
>> On 11/14/2023 8:09 AM, Scott Lurndal wrote:
>>> Bonita Montero <Bonita.Montero@gmail.com> writes:
>>>> Am 14.11.2023 um 16:18 schrieb Scott Lurndal:
>>>>> Bonita Montero <Bonita.Montero@gmail.com> writes:
>>>>>> Am 14.11.2023 um 06:21 schrieb Chris M. Thomasson:
>>>>>>
>>>>>>> You mean a word wrt the arch, or uint64_t on a 32-bit system?
>>>>>>
>>>>>> itemOutput first was a atomic_uint64_t and now is a uint64_t.
>>>>>> The atomicwasn't necessary because itemOutput is accessed within
>>>>>> a mutex access, i.e. it is surrounded with a lock() and unlock()
>>>>>> which itself have a acquire and release behaviour, so I itemOutput
>>>>>> doesn't need to be atomic.
>>>>>
>>>>> In most commonly used architectures a 64-bit load is single-copy
>>>>> atomic regardless of any external synchronization (e.g. a mutex,
>>>>> spin-lock or semaphore).
>>>>
>>>> Maybe, but you can't rely on that. If you have a 32 bit platform
>>>
>>> 32-bit platform is somewhat uncommon (outside of specialty microcontrollers
>>> like the Cortex-M7).
>>>
>>> I'm not aware of any 32-bit platform that supports 64-bit
>>> accesses (other than via two 32-bit accesses).
>>
>> Well, we have cmpxchg8b on 32-bit Intel...
>
> For which a single-copy atomic semantic property is implicit
> in the operation.
>
> As BM pointed out, once SSE et al showed up, there was a way to
> do some 64-bit loads. Not sure they're architecturally
> required to be single-copy atomic, however.
>

Right! I am not sure about that either.


devel / comp.lang.c++ / A Java- / .NET-like monitor

Pages:1234567891011
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor