]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipc/sem.c: bugfix for semctl(,,GETZCNT)
authorManfred Spraul <manfred@colorfullife.com>
Thu, 22 May 2014 00:44:19 +0000 (10:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:44:19 +0000 (10:44 +1000)
commit3e39eb60b8ec1e2cd6c23a4f162bdb7e21f212a7
treec4b3fa77bd56dde2ed529370174e9bfffef0c814
parent7a7c797c6fdc345a5a7e178f06f71174bd51ce39
ipc/sem.c: bugfix for semctl(,,GETZCNT)

GETZCNT is supposed to return the number of threads that wait until 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.

The patch fixes that.  It's intentionally copy&paste, this will be cleaned
up in the next patch.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ipc/sem.c