#include "sanitizer_common/sanitizer_placement_new.h"
#include "tsan_rtl.h"
#include "tsan_mman.h"
#include "tsan_platform.h"
#include "tsan_report.h"
#include "tsan_sync.h"
namespace __tsan {
ThreadContext::ThreadContext(Tid tid) : … { … }
#if !SANITIZER_GO
ThreadContext::~ThreadContext() { … }
#endif
void ThreadContext::OnReset() { … }
#if !SANITIZER_GO
struct ThreadLeak { … };
static void CollectThreadLeaks(ThreadContextBase *tctx_base, void *arg) { … }
#endif
#if !SANITIZER_GO && !SANITIZER_APPLE
static void ReportIgnoresEnabled(ThreadContext *tctx, IgnoreSet *set) { … }
static void ThreadCheckIgnore(ThreadState *thr) { … }
#else
static void ThreadCheckIgnore(ThreadState *thr) {}
#endif
void ThreadFinalize(ThreadState *thr) { … }
int ThreadCount(ThreadState *thr) { … }
struct OnCreatedArgs { … };
Tid ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached) { … }
void ThreadContext::OnCreated(void *arg) { … }
extern "C" void __tsan_stack_initialization() { … }
struct OnStartedArgs { … };
void ThreadStart(ThreadState *thr, Tid tid, tid_t os_id,
ThreadType thread_type) { … }
void ThreadContext::OnStarted(void *arg) { … }
void ThreadFinish(ThreadState *thr) { … }
void ThreadContext::OnFinished() { … }
struct ConsumeThreadContext { … };
Tid ThreadConsumeTid(ThreadState *thr, uptr pc, uptr uid) { … }
struct JoinArg { … };
void ThreadJoin(ThreadState *thr, uptr pc, Tid tid) { … }
void ThreadContext::OnJoined(void *ptr) { … }
void ThreadContext::OnDead() { … }
void ThreadDetach(ThreadState *thr, uptr pc, Tid tid) { … }
void ThreadContext::OnDetached(void *arg) { … }
void ThreadNotJoined(ThreadState *thr, uptr pc, Tid tid, uptr uid) { … }
void ThreadSetName(ThreadState *thr, const char *name) { … }
#if !SANITIZER_GO
void FiberSwitchImpl(ThreadState *from, ThreadState *to) { … }
ThreadState *FiberCreate(ThreadState *thr, uptr pc, unsigned flags) { … }
void FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber) { … }
void FiberSwitch(ThreadState *thr, uptr pc,
ThreadState *fiber, unsigned flags) { … }
#endif
}