LeviLamina
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#include "mc/platform/threading/Mutex.h"
10
11namespace Bedrock::Threading::Detail {
12
13class Tls {
14public:
15 // Tls inner types declare
16 // clang-format off
17 struct Thread;
18 // clang-format on
19
20 // Tls inner types define
21 struct Thread : public ::Bedrock::NonCopyable {
22 public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 8, ::Bedrock::Threading::Detail::Tls*&> mTls;
26 ::ll::TypedStorage<8, 24, ::std::vector<void*>> mValues;
27 // NOLINTEND
28
29 public:
30 // prevent constructor by default
31 Thread& operator=(Thread const&);
32 Thread(Thread const&);
33 Thread();
34
35 public:
36 // member functions
37 // NOLINTBEGIN
38 MCAPI explicit Thread(::Bedrock::Threading::Detail::Tls*& tls);
39 // NOLINTEND
40
41 public:
42 // constructor thunks
43 // NOLINTBEGIN
44 MCAPI void* $ctor(::Bedrock::Threading::Detail::Tls*& tls);
45 // NOLINTEND
46 };
47
48 using Key = uint;
49
50public:
51 // member variables
52 // NOLINTBEGIN
53 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mMutex;
54 ::ll::TypedStorage<8, 24, ::std::vector<::brstd::bitset<1024, uint64>>> mSlots;
55 ::ll::TypedStorage<
56 8,
57 24,
60 ::std::less<::Bedrock::Threading::Detail::Tls::Thread*>,
61 ::std::vector<::Bedrock::Threading::Detail::Tls::Thread*>>>
62 mThreads;
63 // NOLINTEND
64
65public:
66 // member functions
67 // NOLINTBEGIN
68 MCAPI uint allocate();
69 // NOLINTEND
70};
71
72} // namespace Bedrock::Threading::Detail
Definition NonCopyable.h:7
Definition flat_set.h:10