jroelofs created this revision.
Herald added a subscriber: srhines.
Alternatively, I could teach llvm:set_thread_name() how to take a thread
parameter, and use that here instead.
https://reviews.llvm.org/D30844
Files:
source/Host/linux/HostThreadLinux.cpp
Index: source/Host/linux/HostThreadLinux.cpp
===================================================================
--- source/Host/linux/HostThreadLinux.cpp
+++ source/Host/linux/HostThreadLinux.cpp
@@ -23,7 +23,8 @@
: HostThreadPosix(thread) {}
void HostThreadLinux::SetName(lldb::thread_t thread, llvm::StringRef name) {
-#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__)
+#if (((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \
+ defined(_GNU_SOURCE)) || defined(__ANDROID__)
::pthread_setname_np(thread, name.data());
#else
(void)thread;
Index: source/Host/linux/HostThreadLinux.cpp
===================================================================
--- source/Host/linux/HostThreadLinux.cpp
+++ source/Host/linux/HostThreadLinux.cpp
@@ -23,7 +23,8 @@
: HostThreadPosix(thread) {}
void HostThreadLinux::SetName(lldb::thread_t thread, llvm::StringRef name) {
-#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__)
+#if (((__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \
+ defined(_GNU_SOURCE)) || defined(__ANDROID__)
::pthread_setname_np(thread, name.data());
#else
(void)thread;
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits