]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/libcephfs/flock.cc: fix synchronization points
authorYan, Zheng <zyan@redhat.com>
Thu, 19 Mar 2015 09:34:47 +0000 (17:34 +0800)
committerYan, Zheng <zyan@redhat.com>
Fri, 20 Mar 2015 08:00:59 +0000 (16:00 +0800)
commitce244ca940e0bee24d0eb52affb3d4bc9054a854
treeef04f719c6099c9fc271709b69350a2d98ac486a
parentfe25118b73d229d4c113b6c48182422d6b2ee416
test/libcephfs/flock.cc: fix synchronization points

In the threesome test cases, the main thread/process call PING_WORKER()
twice at each synchronization point. It's possible that one worker gets
both notifications and takes two steps forward, another worker gets no
notification.

The fix is use seperate semaphores for odd/even number synchronization
points.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/test/libcephfs/flock.cc