Article View: comp.lang.c++
Article #828Re: How to write a semaphore with futexes
From: Chris M. Thomasson
Date: Wed, 11 Nov 2026 22:15
Date: Wed, 11 Nov 2026 22:15
14 lines
1929 bytes
1929 bytes
On 11/10/2026 11:06 PM, Bonita Montero wrote: > Am 10.11.2026 um 22:32 schrieb Chris M. Thomasson: > >> Fwiw, why not use a kernel semaphore as a slow path? Is this just for >> fun? > > Because signalling or waiting on a semaphore can fail, whereas a futex > only has invalid parameters error codes. I need a solution that is like > a futes in that sense. > Iirc, Joe had some rather neat logic for a cancel on a benaphore. This was around 20 years ago... God, I wonder if I can find the post over on c.p.t I might look for it later on tonight.
Technical Details
Message-ID:
<11d2pea$3eke4$2@dont-email.me>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11cvher$2ahke$1@raubtier-asyl.eternal-september.org> <11d02gm$2h8g0$1@dont-email.me> <11d145g$2qlhs$1@raubtier-asyl.eternal-september.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> Newsgroups: comp.lang.c++ Subject: Re: How to write a semaphore with futexes Date: Wed, 11 Nov 2026 14:15:37 -0800 Organization: A noiseless patient Spider Lines: 14 Message-ID: <11d2pea$3eke4$2@dont-email.me> References: <11cvher$2ahke$1@raubtier-asyl.eternal-september.org> <11d02gm$2h8g0$1@dont-email.me> <11d145g$2qlhs$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: Wed, 11 Nov 2026 22:15:39 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3625412"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+s77zDiYYY9wsEbCeOuz1BAYw2wubEam8="; posting-host="11f9b5e6e37d99a5324f29576617ac26" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:6FjNUbWiLP0J+HVeMYoJqseTLc8= sha256:C0Kqq4GmKu0eZVTQgXV+GKgfJZR8o2SYPU6dw9/Z3t4= sha1:1HAXz4fNc+Th1Ea4E/PEEY7VCEM= sha256:YSU/9xuxvI9UCfyljKNLTA6GEOtfT7Mil/YetMtR8/s= Content-Language: en-US In-Reply-To: <11d145g$2qlhs$1@raubtier-asyl.eternal-september.org>