#include "sanitizer_thread_registry.h"
#include "sanitizer_placement_new.h"
namespace __sanitizer {
ThreadContextBase::ThreadContextBase(u32 tid)
: … { … }
ThreadContextBase::~ThreadContextBase() { … }
void ThreadContextBase::SetName(const char *new_name) { … }
void ThreadContextBase::SetDead() { … }
void ThreadContextBase::SetDestroyed() { … }
bool ThreadContextBase::GetDestroyed() { … }
void ThreadContextBase::SetJoined(void *arg) { … }
void ThreadContextBase::SetFinished() { … }
void ThreadContextBase::SetStarted(tid_t _os_id, ThreadType _thread_type,
void *arg) { … }
void ThreadContextBase::SetCreated(uptr _user_id, u64 _unique_id,
bool _detached, u32 _parent_tid, void *arg) { … }
void ThreadContextBase::Reset() { … }
ThreadRegistry::ThreadRegistry(ThreadContextFactory factory)
: … { … }
ThreadRegistry::ThreadRegistry(ThreadContextFactory factory, u32 max_threads,
u32 thread_quarantine_size, u32 max_reuse)
: … { … }
void ThreadRegistry::GetNumberOfThreads(uptr *total, uptr *running,
uptr *alive) { … }
uptr ThreadRegistry::GetMaxAliveThreads() { … }
u32 ThreadRegistry::CreateThread(uptr user_id, bool detached, u32 parent_tid,
void *arg) { … }
void ThreadRegistry::RunCallbackForEachThreadLocked(ThreadCallback cb,
void *arg) { … }
u32 ThreadRegistry::FindThread(FindThreadCallback cb, void *arg) { … }
ThreadContextBase *
ThreadRegistry::FindThreadContextLocked(FindThreadCallback cb, void *arg) { … }
static bool FindThreadContextByOsIdCallback(ThreadContextBase *tctx,
void *arg) { … }
ThreadContextBase *ThreadRegistry::FindThreadContextByOsIDLocked(tid_t os_id) { … }
void ThreadRegistry::SetThreadName(u32 tid, const char *name) { … }
void ThreadRegistry::SetThreadNameByUserId(uptr user_id, const char *name) { … }
void ThreadRegistry::DetachThread(u32 tid, void *arg) { … }
void ThreadRegistry::JoinThread(u32 tid, void *arg) { … }
ThreadStatus ThreadRegistry::FinishThread(u32 tid) { … }
void ThreadRegistry::StartThread(u32 tid, tid_t os_id, ThreadType thread_type,
void *arg) { … }
void ThreadRegistry::QuarantinePush(ThreadContextBase *tctx) { … }
ThreadContextBase *ThreadRegistry::QuarantinePop() { … }
u32 ThreadRegistry::ConsumeThreadUserId(uptr user_id) { … }
void ThreadRegistry::SetThreadUserId(u32 tid, uptr user_id) { … }
u32 ThreadRegistry::OnFork(u32 tid) { … }
}