sanitizer_common: add deadlock detection to the Mutex2
authorDmitry Vyukov <dvyukov@google.com>
Tue, 20 Jul 2021 09:17:00 +0000 (11:17 +0200)
committerDmitry Vyukov <dvyukov@google.com>
Fri, 23 Jul 2021 07:11:52 +0000 (09:11 +0200)
commit022439931f5be77efaf80b44d587666b0c9b13b5
tree87ca5c0e74683c6424e4f287d9b236ef5161845d
parentfde7550094d035085d3671289d5832962c6af7fe
sanitizer_common: add deadlock detection to the Mutex2

    Copy internal deadlock detector from tsan to sanitizer_common
    (with some cosmetic changes).
    Tsan version will be deleted in subsequent changes.
    This allows us to switch tsan to the sanitizer_common mutex
    and remove tsan's mutex.

Reviewed By: vitalybuka, melver

Differential Revision: https://reviews.llvm.org/D106546
compiler-rt/lib/sanitizer_common/sanitizer_mutex.cpp
compiler-rt/lib/sanitizer_common/sanitizer_mutex.h