Message from discussion Ordering of sem_wait waiters
Received: by 10.68.223.40 with SMTP id qr8mr2241595pbc.0.1336042231526;
Thu, 03 May 2012 03:50:31 -0700 (PDT)
From: Noob <r...@127.0.0.1>
Subject: Re: Ordering of sem_wait waiters
Date: Thu, 03 May 2012 12:50:45 +0200
Organization: A noiseless patient Spider
References: <email@example.com> <firstname.lastname@example.org> <email@example.com>
Injection-Date: Thu, 3 May 2012 10:50:30 +0000 (UTC)
Injection-Info: mx04.eternal-september.org; posting-host="qOOJ7oSlu3pYhSFGtIVsxw";
logging-data="12823"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX19vy91YfdY2pW/5mYwGGm7DXkvVyQKF9+8="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120312 Firefox/11.0 SeaMonkey/2.8
Content-Type: text/plain; charset=ISO-8859-1
Rainer Weikusat wrote:
> Noob <r...@127.0.0.1> writes:
>> Noob wrote:
>>> The (proprietary) OS I've been working with provides two "types"
>>> of semaphores: fifo or prio. They differ in how callers of the
>>> wait function are handled.
>>> When the semaphore count is 0, callers of wait on a fifo semaphore
>>> are stored in FIFO order in the wait queue, without consideration
>>> for the thread's priority.
>>> Looking at POSIX semaphores, and sem_wait specifically, I'm
>>> wondering what kind of strategy is implemented on typical
>>> POSIX platforms, and on recent Linux kernels?
>> Would anyone care to comment?
> Hmm ... what kind of comment do you expect?
I was expecting something along the lines of: "POSIX indeed
leaves the behavior of sem_wait up to the implementation" and
"Yes, recent Linux kernels do implement a prio semaphore".
(Or the opposite.)