]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/ceph_mutex: note whether mutex debug methods are usable
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 3 Oct 2023 20:45:12 +0000 (20:45 +0000)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 8 Nov 2023 18:43:48 +0000 (13:43 -0500)
commit2fe7595e025eca0e6f49efcb77b87a7fc9182ebf
tree42b9d1ada7bdbdc47c4f2103aa7a39b166bcb35a
parent58d1f9dd057faf1c515ec69340be17b2ce507bbf
common/ceph_mutex: note whether mutex debug methods are usable

So we can do checks like:

    ceph_assert(!ceph::mutex_debugging || !ceph_mutex_is_locked_by_me(lock));

Without this boolean, this check:

    ceph_assert(!ceph_mutex_is_locked_by_me(lock));

will fail for all crimson/release builds because the method always returns true.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit a8bd314bbd78dbe73371e7a8beaaa1929577b76e)
src/common/ceph_mutex.h