aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/clang14-rt/lib/hwasan/hwasan_thread_list.cpp
blob: fa46e658b69d535c70a4696f6b1c774801536e1d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "hwasan_thread_list.h"

namespace __hwasan {
static ALIGNED(16) char thread_list_placeholder[sizeof(HwasanThreadList)];
static HwasanThreadList *hwasan_thread_list;

HwasanThreadList &hwasanThreadList() { return *hwasan_thread_list; }

void InitThreadList(uptr storage, uptr size) {
  CHECK(hwasan_thread_list == nullptr);
  hwasan_thread_list =
      new (thread_list_placeholder) HwasanThreadList(storage, size);
}

} // namespace __hwasan