forked from OSchip/llvm-project
[tsan] fix thread_name.cc test to work with older versions of libc
llvm-svn: 173023
This commit is contained in:
parent
3e0a363021
commit
9b46312c87
|
@ -15,7 +15,11 @@ void *Thread1(void *x) {
|
|||
}
|
||||
|
||||
void *Thread2(void *x) {
|
||||
#if defined(__linux__) && __GLIBC_PREREQ(2, 12)
|
||||
pthread_setname_np(pthread_self(), "Thread2");
|
||||
#else
|
||||
AnnotateThreadName(__FILE__, __LINE__, "Thread2");
|
||||
#endif
|
||||
Global--;
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue