[PATCH] D31472: Move current thread data out of lsan_common on linux
Francis Ricci via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 29 15:02:19 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL299032: Move current thread data out of lsan_common on linux (authored by fjricci).
Changed prior to commit:
https://reviews.llvm.org/D31472?vs=93389&id=93413#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31472
Files:
compiler-rt/trunk/lib/lsan/lsan_common_linux.cc
compiler-rt/trunk/lib/lsan/lsan_linux.cc
Index: compiler-rt/trunk/lib/lsan/lsan_common_linux.cc
===================================================================
--- compiler-rt/trunk/lib/lsan/lsan_common_linux.cc
+++ compiler-rt/trunk/lib/lsan/lsan_common_linux.cc
@@ -34,10 +34,6 @@
return LibraryNameIs(full_name, kLinkerName);
}
-static THREADLOCAL u32 current_thread_tid = kInvalidTid;
-u32 GetCurrentThread() { return current_thread_tid; }
-void SetCurrentThread(u32 tid) { current_thread_tid = tid; }
-
__attribute__((tls_model("initial-exec")))
THREADLOCAL int disable_counter;
bool DisabledInThisThread() { return disable_counter > 0; }
Index: compiler-rt/trunk/lib/lsan/lsan_linux.cc
===================================================================
--- compiler-rt/trunk/lib/lsan/lsan_linux.cc
+++ compiler-rt/trunk/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; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31472.93413.patch
Type: text/x-patch
Size: 1162 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170329/a80e36dc/attachment.bin>
More information about the llvm-commits
mailing list