1 #include "hwasan_thread_list.h"
3 #include "sanitizer_common/sanitizer_thread_arg_retval.h"
7 static HwasanThreadList
*hwasan_thread_list
;
8 static ThreadArgRetval
*thread_data
;
10 HwasanThreadList
&hwasanThreadList() { return *hwasan_thread_list
; }
11 ThreadArgRetval
&hwasanThreadArgRetval() { return *thread_data
; }
13 void InitThreadList(uptr storage
, uptr size
) {
14 CHECK_EQ(hwasan_thread_list
, nullptr);
16 static ALIGNED(alignof(
17 HwasanThreadList
)) char thread_list_placeholder
[sizeof(HwasanThreadList
)];
19 new (thread_list_placeholder
) HwasanThreadList(storage
, size
);
21 CHECK_EQ(thread_data
, nullptr);
23 static ALIGNED(alignof(
24 ThreadArgRetval
)) char thread_data_placeholder
[sizeof(ThreadArgRetval
)];
25 thread_data
= new (thread_data_placeholder
) ThreadArgRetval();
28 } // namespace __hwasan