🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #2083

Why ordered mutexed don't work ...

#2083
From: Bonita Montero
Date: Wed, 02 Dec 2026 11:58
11 lines
1934 bytes
Just for fun, I tried writing a mutex today that wakes up threads
in the same order they began waiting. I thought I was finished, but
while cycling into the old town for a meal, it occurred to me: I can
control the order in which threads start waiting, but I cannot control
the order in which the scheduler wakes them up. Furthermore, if there
isn’t a free CPU core available, there’s no guarantee that a thread
will be woken up immediately. Once I got home, well-fed, I deleted
the entire project.
In any case, no operating system offers such mutexes, and runtime
environments don’t provide them either. I suspect I’m not the first
person to come up with this idea.
Technical Details
Message-ID: <11ep150$2vi4k$1@raubtier-asyl.eternal-september.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita Montero <Bonita.Montero@gmail.com>
Newsgroups: comp.lang.c
Subject: Why ordered mutexed don't work ...
Date: Wed, 2 Dec 2026 12:58:25 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <11ep150$2vi4k$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 02 Dec 2026 11:58:25 +0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org;
	logging-data="3131540"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+TYM41xQDcCDPOLSwlJ/5vCUJFpeL6IwE="; posting-host="c027a945f7bd50f771ad70fb4e4aaf64"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:G4kv6n5bxq84YIsssNR3ohMFUDk= sha256:T/Ur79N08aJPQBuFYOcoF+p/RYhf5bO/RXBsSR8/e5A=
	sha1:Cm8O0QxbJBPOUwHqZ7k4rm305VE= sha256:cQJQIinmDbStxQE6CDeG8lf4I6UwiR5uffUrkTtOzrU=
Content-Language: de-DE