Sujet : Re: Futex Stack Test...
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : comp.lang.c++Date : 02. May 2025, 22:41:18
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vv3e5v$1vdo4$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 5/2/2025 11:30 AM, Chris M. Thomasson wrote:
On 5/2/2025 4:01 AM, Wuns Haerst wrote:
It's not hard to implement a lock-free stack with DW-CAS,
Oh, I know. :^)
Fwiw, my stack uses exchange for pop and a normal cas push. Have another one that uses exchange for push and pop, pretty nice.
so no need for futexes. That's my dcas_atomic:
Keep in mind that the futex is only there to allow threads to wait on an empty condition...
[snip code]
I will take a look later on today.
Later on... Working now with GPU fun.
https://youtu.be/xDROUq-q0yI;^D
Keep in mind that the futex is there to allow for waits.