llvm/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cpp

//===-- sanitizer_thread_registry.cpp -------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file is shared between sanitizer tools.
//
// General thread bookkeeping functionality.
//===----------------------------------------------------------------------===//

#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 implementation.

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) {}

// Normally this is called when the thread is about to exit.  If
// called in ThreadStatusCreated state, then this thread was never
// really started.  We just did CreateThread for a prospective new
// thread before trying to create it, and then failed to actually
// create it, and so never called StartThread.
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) {}

}  // namespace __sanitizer