sead
Loading...
Searching...
No Matches
seadThreadLocalStorage.h
Go to the documentation of this file.
1#ifndef SEAD_THREAD_LOCAL_STORAGE_H_
2#define SEAD_THREAD_LOCAL_STORAGE_H_
3
4#include <basis/seadTypes.h>
5
6namespace sead {
7
9{
10public:
13 {
14#ifdef cafe
15 if (!sIsIndex0Used)
16 {
17 mThreadLocalStorageInner = 0;
18 sIsIndex0Used = true;
19 }
20 else if (!sIsIndex1Used)
21 {
22 mThreadLocalStorageInner = 1;
23 sIsIndex1Used = true;
24 }
25#endif // cafe
26 }
27
28#ifdef cafe
29 s32 getValue() const
30 {
32 }
33#endif // cafe
34
35private:
36#ifdef cafe
37 static bool sIsIndex0Used;
38 static bool sIsIndex1Used;
40#endif // cafe
41};
42#ifdef cafe
43static_assert(sizeof(ThreadLocalStorage) == 4, "sead::ThreadLocalStorage size mismatch");
44#endif // cafe
45
46} // namespace sead
47
48#endif // SEAD_THREAD_LOCAL_STORAGE_H_
Definition seadThreadLocalStorage.h:9
ThreadLocalStorage()
Definition seadThreadLocalStorage.h:11
Definition seadAssert.h:44