On Sat, 2014-05-10 at 12:03 +0200, Manfred Spraul wrote:Reading the code.
GETZCNT is supposed to return the number of threads that wait untilIndeed. the pending_alter list does represent blocked processes on the
a semaphore value becomes 0.
The current implementation overlooks complex operations that contain
both wait-for-zero operation and operations that alter at least one semaphore.
sem. Good catch. Btw, how on earth did you run into this? reading the
code or a real case?
In this case:The patch fixes that.Instead I would have expected this patch to actually come after the
It's intentionally copy&paste, this will be cleaned up in the next patch.
count_* refactoring.