#include "src/__support/threads/thread.h"
#include "src/__support/macros/config.h"
#include "src/__support/threads/mutex.h"
#include "src/__support/CPP/array.h"
#include "src/__support/CPP/mutex.h"
#include "src/__support/CPP/optional.h"
#include "src/__support/fixedvector.h"
#include "src/__support/macros/attributes.h"
namespace LIBC_NAMESPACE_DECL {
namespace {
AtExitCallback;
struct AtExitUnit { … };
constexpr size_t TSS_KEY_COUNT = …;
struct TSSKeyUnit { … };
class TSSKeyMgr { … };
TSSKeyMgr tss_key_mgr;
struct TSSValueUnit { … };
static LIBC_THREAD_LOCAL cpp::array<TSSValueUnit, TSS_KEY_COUNT> tss_values;
}
class ThreadAtExitCallbackMgr { … };
static LIBC_THREAD_LOCAL ThreadAtExitCallbackMgr atexit_callback_mgr;
extern "C" int __cxa_thread_atexit_impl(AtExitCallback *callback, void *obj,
void *) { … }
namespace internal {
ThreadAtExitCallbackMgr *get_thread_atexit_callback_mgr() { … }
void call_atexit_callbacks(ThreadAttributes *attrib) { … }
}
cpp::optional<unsigned int> new_tss_key(TSSDtor *dtor) { … }
bool tss_key_delete(unsigned int key) { … }
bool set_tss_value(unsigned int key, void *val) { … }
void *get_tss_value(unsigned int key) { … }
}