hwasan_thread_list.cpp 451 B

123456789101112131415
  1. #include "hwasan_thread_list.h"
  2. namespace __hwasan {
  3. static ALIGNED(16) char thread_list_placeholder[sizeof(HwasanThreadList)];
  4. static HwasanThreadList *hwasan_thread_list;
  5. HwasanThreadList &hwasanThreadList() { return *hwasan_thread_list; }
  6. void InitThreadList(uptr storage, uptr size) {
  7. CHECK(hwasan_thread_list == nullptr);
  8. hwasan_thread_list =
  9. new (thread_list_placeholder) HwasanThreadList(storage, size);
  10. }
  11. } // namespace __hwasan