AuroraRuntime/Include/Aurora/Threading/Threads/TLSView.hpp
2023-04-30 08:24:27 +01:00

25 lines
524 B
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: TLSView.hpp
Date: 2021-6-9
Author: Reece
***/
#pragma once
namespace Aurora::Threading::Threads
{
struct TLSKey
{
Primitives::SpinLock lock;
void *pContext {};
};
struct AUKN_SYM TLSView
{
using TlsCb = AuFunction<void(void *)>;
static void Remove(TLSKey &key);
static void *InitTLS(TLSKey &key, AuMach length, const TlsCb &init, const TlsCb &deinit);
};
}