#include <sanitizer_common/sanitizer_deadlock_detector_interface.h>
#include <sanitizer_common/sanitizer_stackdepot.h>
#include "tsan_rtl.h"
#include "tsan_flags.h"
#include "tsan_sync.h"
#include "tsan_report.h"
#include "tsan_symbolize.h"
#include "tsan_platform.h"
namespace __tsan {
void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r);
void ReportDestroyLocked(ThreadState *thr, uptr pc, uptr addr,
FastState last_lock, StackID creation_stack_id);
struct Callback final : public DDCallback { … };
void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s) { … }
static void ReportMutexMisuse(ThreadState *thr, uptr pc, ReportType typ,
uptr addr, StackID creation_stack_id) { … }
static void RecordMutexLock(ThreadState *thr, uptr pc, uptr addr,
StackID stack_id, bool write) { … }
static void RecordMutexUnlock(ThreadState *thr, uptr addr) { … }
void MutexCreate(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { … }
void MutexDestroy(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { … }
void MutexPreLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { … }
void MutexPostLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz, int rec) { … }
int MutexUnlock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { … }
void MutexPreReadLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { … }
void MutexPostReadLock(ThreadState *thr, uptr pc, uptr addr, u32 flagz) { … }
void MutexReadUnlock(ThreadState *thr, uptr pc, uptr addr) { … }
void MutexReadOrWriteUnlock(ThreadState *thr, uptr pc, uptr addr) { … }
void MutexRepair(ThreadState *thr, uptr pc, uptr addr) { … }
void MutexInvalidAccess(ThreadState *thr, uptr pc, uptr addr) { … }
void Acquire(ThreadState *thr, uptr pc, uptr addr) { … }
void AcquireGlobal(ThreadState *thr) { … }
void Release(ThreadState *thr, uptr pc, uptr addr) { … }
void ReleaseStore(ThreadState *thr, uptr pc, uptr addr) { … }
void ReleaseStoreAcquire(ThreadState *thr, uptr pc, uptr addr) { … }
void IncrementEpoch(ThreadState *thr) { … }
#if !SANITIZER_GO
void AfterSleep(ThreadState *thr, uptr pc) { … }
#endif
void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r) { … }
void ReportDestroyLocked(ThreadState *thr, uptr pc, uptr addr,
FastState last_lock, StackID creation_stack_id) { … }
}