Article View: comp.lang.c++
Article #876Re: How to write a semaphore with futexes
From: Chris M. Thomasson
Date: Sun, 15 Nov 2026 20:36
Date: Sun, 15 Nov 2026 20:36
24 lines
2495 bytes
2495 bytes
On 11/15/2026 11:52 AM, Joseph Seigh wrote: > On 11/14/26 6:16 PM, Chris M. Thomasson wrote: >> On 11/13/2026 6:44 AM, Joseph Seigh wrote: >> [...] >> >> I have not had time to search for your interesting old cancel method >> for the fast semaphore on c.p.t, basically a benaphore iirc. Can you >> find it? > > Probably the one using bits 63-1 as the count and bit 0 as a cancel > flag, 1 = active, 0 = canceled. No, I "think" that was for your old 63 atomic counter on a 32 bit system? Back on an old x86 group, iirc. God its been a while. > Who uses semaphores? They're not > especially useful. ;^) It was an old one where you showed a fast semaphore (basically a benaphore, iirc). You had a function, iirc, called process_cancels or something.
Technical Details
Message-ID:
<11dd54n$32c6h$1@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> <11d2p9c$3eke4$1@dont-email.me> <11d2r97$3f9sa$2@raubtier-asyl.eternal-september.org> <11d2sca$3fn5d$1@dont-email.me> <11d4q72$bdct$1@dont-email.me> <0iGdnbMEEbSZiGv3nZ2dnZfqnPqdnZ2d@giganews.com> <11d55rp$8hhb$1@dont-email.me> <11d566l$8mlf$1@dont-email.me> <11d77og$tk4f$1@dont-email.me> <11daq5b$2bds2$2@dont-email.me> <11dd2h6$31hl8$1@dont-email.me>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: Sun, 15 Nov 2026 12:36:38 -0800 Organization: A noiseless patient Spider Lines: 24 Message-ID: <11dd54n$32c6h$1@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> <11d2p9c$3eke4$1@dont-email.me> <11d2r97$3f9sa$2@raubtier-asyl.eternal-september.org> <11d2sca$3fn5d$1@dont-email.me> <11d4q72$bdct$1@dont-email.me> <0iGdnbMEEbSZiGv3nZ2dnZfqnPqdnZ2d@giganews.com> <11d55rp$8hhb$1@dont-email.me> <11d566l$8mlf$1@dont-email.me> <11d77og$tk4f$1@dont-email.me> <11daq5b$2bds2$2@dont-email.me> <11dd2h6$31hl8$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 15 Nov 2026 20:36:40 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3223761"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wEUJcsBQxB1MAz0/SY4mTsoebimPvqk0="; posting-host="8d4bfe82b7f7bce740ab6d5ca121f681" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:nIBiL4yRLClGvkoYTTUoD8jHwTo= sha256:fOCMSQBnwvAjYkuXaKYJMJJYTyWA4tDSLEgLUDexOHg= sha1:Hdf9lqipS74hXnd6MSG+Squcito= sha256:IdhQUq42BCG/vOrovOvyx7NYddTCNkHslzps9hu7ZiQ= In-Reply-To: <11dd2h6$31hl8$1@dont-email.me> Content-Language: en-US