* Clarification re: outstanding IPC flaws
@ 2007-11-26 17:01 Tom Burns
2007-11-26 17:05 ` Tom Burns
0 siblings, 1 reply; 2+ messages in thread
From: Tom Burns @ 2007-11-26 17:01 UTC (permalink / raw)
To: linux-kernel
Hi List,
Reading current kernel git ipc/sem.c I see the following comment:
--
* - The previous code had two flaws:
...
* 2) It did not wake up all zero waiting processes. We try to do
* better but only get the semops right which only wait for zero or
* increase. If there are decrement operations in the operations
* array we do the same as before.
--
I have some questions about this comment.
Most importantly - does this mean that if I have multiple processes
queued inside semop() calls with sem_val = -1 (also, if it matters,
SEM_UNDO flag is set), I can expect to eventually see none of the
queued processes woken up when whoever has the semaphore releases it?
If that's the case, is there any semop best-use example I should be
following for multiple multi-threaded processes sharing multiple
semaphores?
Currently I have some globally reachable semaphores doing semop calls
with SEM_UNDO. They usually work fine with multiple processes waiting
on each other to lock the semaphore, but under certain circumstances a
semaphore will be released and none of the processes waiting on the
semaphore will be woken up.
Thanks in advance,
Tom Burns
Software Developer
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Clarification re: outstanding IPC flaws
2007-11-26 17:01 Clarification re: outstanding IPC flaws Tom Burns
@ 2007-11-26 17:05 ` Tom Burns
0 siblings, 0 replies; 2+ messages in thread
From: Tom Burns @ 2007-11-26 17:05 UTC (permalink / raw)
To: linux-kernel
Sorry for the double post.
On Nov 26, 2007 12:01 PM, Tom Burns <tom.i.burns@gmail.com> wrote:
> I have some questions about this comment.
>
> Most importantly - does this mean that if I have multiple processes
> queued inside semop() calls with sem_val = -1 (also, if it matters,
> SEM_UNDO flag is set),
This should read "sem_op = -1" as opposed to "sem_val = -1".
Cheers,
Tom Burns
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-26 17:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-26 17:01 Clarification re: outstanding IPC flaws Tom Burns
2007-11-26 17:05 ` Tom Burns
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®