]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common/ceph_mutex: ceph::{mutex,condition_variable,lock_guard}
authorSage Weil <sage@redhat.com>
Fri, 14 Sep 2018 22:19:12 +0000 (17:19 -0500)
committerSage Weil <sage@redhat.com>
Fri, 21 Sep 2018 16:55:56 +0000 (11:55 -0500)
commitc3f70dc4a86efb807d891de33b1f07e829478434
tree255866bf4a2cecb286a7f3043bd3c9e08648cc3d
parent77acda721910964faa52175afc9d32a5fec8e415
common/ceph_mutex: ceph::{mutex,condition_variable,lock_guard}

If CEPH_DEBUG_MUTEX is defined, use the [recursive_]mutex_debug classes
that implement lockdep and a bucnh of other random debug checks.  Also
typedef ceph::condition_variable to std::condition_variable_debug, which
adds addition assertions and debug checks.

If CEPH_DEBUG_MUTEX is not defined, then use the bare-bones C++ std::mutex
primitives... or as close as we can get to them.

Since the [recursive_]mutex_debug classes take a string argument for the
lockdep piece, define factory functions ceph::make_[recursive_]mutex that
either pass arguments to the debug implementations or toss them out.

Signed-off-by: Sage Weil <sage@redhat.com>
CMakeLists.txt
src/CMakeLists.txt
src/common/ceph_mutex.h [new file with mode: 0644]
src/test/common/CMakeLists.txt
src/test/common/test_lockdep.cc [new file with mode: 0644]
src/test/librados_test_stub/TestWatchNotify.cc