Skip to content
LeviMC
Home
Projects
Docs
6
LeviLamina
Mod loader for Minecraft Bedrock Edition
LegacyScriptEngine
Runs LLSE script plugins on LeviLamina
lip
General package installer
LeviLauncher
Bedrock launcher for Windows and Android
Be.D.D.
Scripted client input for mod tests
bedboo
Bedrock bots with a mineflayer-compatible API
All repositories on GitHub
Mods
Blog
Community
About
English
English
简体中文
繁體中文
Auto
Light
Dark
Auto
Light
Dark
LeviLamina
User Guides
Developer Guides
API Guides
API Reference
Maintainer Guides
Resources
LeviLamina on GitHub
LeviMC
Home
Projects
Docs
6
LeviLamina
Mod loader for Minecraft Bedrock Edition
LegacyScriptEngine
Runs LLSE script plugins on LeviLamina
lip
General package installer
LeviLauncher
Bedrock launcher for Windows and Android
Be.D.D.
Scripted client input for mod tests
bedboo
Bedrock bots with a mineflayer-compatible API
All repositories on GitHub
Mods
Blog
Community
About
API Reference
On this page
LeviLamina
User Guides
Developer Guides
API Guides
API Reference
Maintainer Guides
Search
Ctrl
K
Loading...
Searching...
No Matches
Tls.h
1
#pragma once
2
3
#include "mc/_HeaderOutputPredefine.h"
4
5
// auto generated inclusion list
6
#include "mc/platform/NonCopyable.h"
7
#include "mc/platform/brstd/bitset.h"
8
#include "mc/platform/brstd/flat_set.h"
9
10
namespace
Bedrock::Threading::Detail {
11
12
class
Tls
{
13
public
:
14
// Tls inner types declare
15
// clang-format off
16
struct
Thread
;
17
// clang-format on
18
19
// Tls inner types define
20
struct
Thread :
public
::Bedrock::NonCopyable
{
21
public
:
22
// member variables
23
// NOLINTBEGIN
24
::ll::TypedStorage<8, 8, ::Bedrock::Threading::Detail::Tls*&> mTls;
25
::ll::TypedStorage<8, 24, ::std::vector<void*>> mValues;
26
// NOLINTEND
27
28
public
:
29
// prevent constructor by default
30
Thread& operator=(Thread
const
&);
31
Thread(Thread
const
&);
32
Thread();
33
34
public
:
35
// member functions
36
// NOLINTBEGIN
37
MCNAPI
explicit
Thread
(
::Bedrock::Threading::Detail::Tls
*& tls);
38
// NOLINTEND
39
40
public
:
41
// constructor thunks
42
// NOLINTBEGIN
43
MCNAPI
void
*
$ctor
(
::Bedrock::Threading::Detail::Tls
*& tls);
44
// NOLINTEND
45
};
46
47
using
Key = uint;
48
49
public
:
50
// member variables
51
// NOLINTBEGIN
52
::ll::TypedStorage<8, 80, ::std::mutex> mMutex;
53
::ll::TypedStorage<8, 24, ::std::vector<::brstd::bitset<1024, uint64>>> mSlots;
54
::ll::TypedStorage<
55
8,
56
24,
57
::brstd::flat_set
<
58
::Bedrock::Threading::Detail::Tls::Thread
*,
59
::std::less<::Bedrock::Threading::Detail::Tls::Thread*>,
60
::std::vector<::Bedrock::Threading::Detail::Tls::Thread*>>>
61
mThreads;
62
// NOLINTEND
63
64
public
:
65
// member functions
66
// NOLINTBEGIN
67
MCNAPI uint
allocate
();
68
69
MCNAPI
void
free
(uint key);
70
71
MCNAPI
void
registerThread
(
::Bedrock::Threading::Detail::Tls::Thread
& thread);
72
// NOLINTEND
73
};
74
75
}
// namespace Bedrock::Threading::Detail
Bedrock::NonCopyable
Definition
NonCopyable.h:7
Bedrock::Threading::Detail::Tls
Definition
Tls.h:12
Bedrock::Threading::Detail::Tls::free
MCAPI void free(uint key)
Bedrock::Threading::Detail::Tls::allocate
MCAPI uint allocate()
Bedrock::Threading::Detail::Tls::registerThread
MCAPI void registerThread(::Bedrock::Threading::Detail::Tls::Thread &thread)
brstd::flat_set
Definition
flat_set.h:10
Bedrock::Threading::Detail::Tls::Thread
Definition
Tls.h:20
Bedrock::Threading::Detail::Tls::Thread::Thread
MCAPI Thread(::Bedrock::Threading::Detail::Tls *&tls)
Bedrock::Threading::Detail::Tls::Thread::$ctor
MCAPI void * $ctor(::Bedrock::Threading::Detail::Tls *&tls)
src
mc
platform
threading
Tls.h
Generated on
for LeviLamina by
1.16.1