]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: add ceph::fair_mutex
authorKefu Chai <kchai@redhat.com>
Fri, 30 Jul 2021 04:44:52 +0000 (12:44 +0800)
committerXiubo Li <xiubli@redhat.com>
Mon, 13 Sep 2021 06:14:48 +0000 (14:14 +0800)
commit12ab12e6efc91eec42be74e9a456277969b762a3
tree644b2580a5ca966f7d6003d5b74168fafaeaeb69
parent9989418f7d3c0967385a5f8693f1cf837d4449ed
common: add ceph::fair_mutex

a mutex which enqueues and wakes up the waiters in FIFO order, to
ensure the fairness of the mutex.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 8c07345d331495e0b76cbe02e95593f66a5fcc43)
src/common/fair_mutex.h [new file with mode: 0644]
src/test/common/CMakeLists.txt
src/test/common/test_fair_mutex.cc [new file with mode: 0644]