[PATCH] [Tsan] Fix the thread_name tests to build on FreeBSD

Ed Maste emaste at freebsd.org
Mon Oct 20 16:53:59 PDT 2014


FreeBSD supports setting thread names via (from `pthread_np.h`):
```void pthread_set_name_np(pthread_t tid, const char *name);```

================
Comment at: test/tsan/thread_name.cc:25
@@ -19,2 +24,3 @@
+#if USE_PTHREAD_SETNAME_NP
   pthread_setname_np(pthread_self(), "Thread2");
 #else
----------------
The FreeBSD equivalent is (in `pthread_np.h`):
```void pthread_set_name_np(pthread_t tid, const char *name);```

http://reviews.llvm.org/D5855






More information about the llvm-commits mailing list