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
6
namespace
sead
{
7
8
class
ThreadLocalStorage
9
{
10
public
:
11
ThreadLocalStorage
()
12
:
mThreadLocalStorageInner
(0)
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
{
31
return
mThreadLocalStorageInner
;
32
}
33
#
endif
// cafe
34
35
private
:
36
#
ifdef
cafe
37
static
bool
sIsIndex0Used
;
38
static
bool
sIsIndex1Used
;
39
s32
mThreadLocalStorageInner
;
40
#
endif
// cafe
41
};
42
#
ifdef
cafe
43
static_assert
(
sizeof
(
ThreadLocalStorage
) == 4,
"sead::ThreadLocalStorage size mismatch"
);
44
#
endif
// cafe
45
46
}
// namespace sead
47
48
#
endif
// SEAD_THREAD_LOCAL_STORAGE_H_
sead::ThreadLocalStorage
Definition
seadThreadLocalStorage.h:9
sead::ThreadLocalStorage::ThreadLocalStorage
ThreadLocalStorage()
Definition
seadThreadLocalStorage.h:11
sead
Definition
seadAssert.h:44
engine
library
include
thread
seadThreadLocalStorage.h
Generated by
1.14.0