diff options
Diffstat (limited to 'compiler-rt/lib/lsan/lsan_linux.cc')
-rw-r--r-- | compiler-rt/lib/lsan/lsan_linux.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/lsan/lsan_linux.cc b/compiler-rt/lib/lsan/lsan_linux.cc index c0b6f4b6505..a60f7413a52 100644 --- a/compiler-rt/lib/lsan/lsan_linux.cc +++ b/compiler-rt/lib/lsan/lsan_linux.cc @@ -19,6 +19,10 @@ namespace __lsan { +static THREADLOCAL u32 current_thread_tid = kInvalidTid; +u32 GetCurrentThread() { return current_thread_tid; } +void SetCurrentThread(u32 tid) { current_thread_tid = tid; } + static THREADLOCAL AllocatorCache allocator_cache; AllocatorCache *GetAllocatorCache() { return &allocator_cache; } |