Article View: comp.lang.c++
Article #847Re: How to write a semaphore with futexes
From: Ross Finlayson
Date: Fri, 13 Nov 2026 12:50
Date: Fri, 13 Nov 2026 12:50
59 lines
3993 bytes
3993 bytes
On 11/13/2026 02:07 AM, boltar@caprica.universe wrote: > On Thu, 12 Nov 2026 11:35:24 -0800 > Ross Finlayson <ross.a.finlayson@gmail.com> gabbled: >> On 11/12/2026 08:41 AM, boltar@caprica.universe wrote: >>> On Wed, 11 Nov 2026 15:05:43 -0800 >>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> gabbled: >>>> On 11/11/2026 2:47 PM, Bonita Montero wrote: >>>>> Am 11.11.2026 um 23:12 schrieb Chris M. Thomasson: >>>>> >>>>>> I see. A fun failure on a sem_wait is EINTR. >>>>> >>>>> That's not a out of recources error and it is recoverable. >>>> >>>> Its scary though when people fail to know about it. >>> >>> Anyone who doesn't read the man page before they use an unfamiliar >>> function >>> frankly deserves what they get. >>> >> >> >> Here's one for you. >> >> So, I want a MPSC queue, multiple-producer single-consumer queue, >> producers on the order of 1000, with that appends to the queue push(), >> push_back, pretty much must use compare-and-swap the only atomic > > Blah blah. > > Sorry, what's your point exactly? That people shouldn't bother reading the > man page about a function or whatever other documentation is available > before > they try to use it? > Ah, good old linear thinking. Basically looking to make sense of the great circle of things, of course a lot depends on "the stability of fact", vis-a-vis something like Magritte's "The Treachery of Images" vis-a-vis "The Empire of Light", point being that I've already read the man pages most of them. (Man pages, RFC's, standards & specifications, like from ITU and ISO.) So, my point is a sort of retro approach to simple and practical systems, to live in a world of modern systems, since the logical and abstract is about things like "C, C++, and POSIX", in a world of "many-core hyper-virtualized containerized boxes", and about things like "Internet protocols" and "distributed systems". The idea is to write what are of the good old specifications in the good old code, with modern expectations of the runtime. Then, the code should also be well-designed and written from the beginning to cover the relevant surface of the runtime, while having the nice abstraction and these sorts of things.
Technical Details
Message-ID:
<_NScnclW29oSmmr3nZ2dnZfqn_ednZ2d@giganews.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!local-2.nntp.ord.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.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> <11d6ngs$1tvjm$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!local-2.nntp.ord.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 13 Nov 2026 12:50:23 +0000 Subject: Re: How to write a semaphore with futexes Newsgroups: comp.lang.c++ 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> <11d6ngs$1tvjm$1@dont-email.me> From: Ross Finlayson <ross.a.finlayson@gmail.com> Date: Fri, 13 Nov 2026 04:50:08 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <11d6ngs$1tvjm$1@dont-email.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <_NScnclW29oSmmr3nZ2dnZfqn_ednZ2d@giganews.com> Lines: 59 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-kALikrI9t8gy25cXxVjWPmDmoNVyBIbQr5z8u4ylDJBuQzu16sW90wIXJpGPmKHU/7BZbuIjC31l28d!aF7MfwJKid0lZ3r9q5S+bjH+dW2CNOUkoiYZi021orkOIMOGbPJbSKGeIKHlFn5VZFP9vjeRtno7 X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40