]> 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>
Fri, 6 Oct 2023 00:27:00 +0000 (20:27 -0400)
commita8bd314bbd78dbe73371e7a8beaaa1929577b76e
treedd38182b4c0d52d928cd7ab34555eb0b15f9eee6
parentcd1833ab152d0231c1c6f3685238f4fcd3284f6e
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>
src/common/ceph_mutex.h