[tsan] force tls_model='initial-exec' for tsan's cur_thread_placeholder so that we don't depend on the compiler flags

llvm-svn: 208536
This commit is contained in:
Kostya Serebryany 2014-05-12 10:40:33 +00:00
parent aeb18fc787
commit e61f4d5155
1 changed files with 1 additions and 0 deletions

View File

@ -473,6 +473,7 @@ struct ThreadState {
};
#ifndef TSAN_GO
__attribute__((tls_model("initial-exec")))
extern THREADLOCAL char cur_thread_placeholder[];
INLINE ThreadState *cur_thread() {
return reinterpret_cast<ThreadState *>(&cur_thread_placeholder);