]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: add ceph::fair_mutex 42556/head
authorKefu Chai <kchai@redhat.com>
Fri, 30 Jul 2021 04:44:52 +0000 (12:44 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 30 Jul 2021 05:01:20 +0000 (13:01 +0800)
commit8c07345d331495e0b76cbe02e95593f66a5fcc43
treecf342c94a07e37ce292f42a8e2cefccbb63f1bb7
parentc22e44895da8a053f339ada2f30a8f851ee872ef
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>
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]