summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2020-03-27 00:03:41 -0700
committerChris Dickens <christopher.a.dickens@gmail.com>2020-03-27 00:03:41 -0700
commit30b56baec51b70d5b10f1f14ff47327ecc8ebbd0 (patch)
tree1e5fbc312cff509037a75c81a24bea5708394df5 /android
parent1d67425879c3ae515e97b73df94bf2e7336178b0 (diff)
downloadlibusb-30b56baec51b70d5b10f1f14ff47327ecc8ebbd0.tar.gz
threads_posix: Improve usbi_get_tid() for various platforms
Add support for real thread IDs on macOS 10.6 and later using the new pthread_threadid_np() function. Add support for thread IDs on Haiku, NetBSD and Solaris. Provide a fallback value other than -1 when direct support is not available. This should suffice as a unique identifier since pthread_t, while opaque, is still distinct amongst active threads. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'android')
-rw-r--r--android/config.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/android/config.h b/android/config.h
index 9b95bb2..060940f 100644
--- a/android/config.h
+++ b/android/config.h
@@ -29,6 +29,9 @@
/* Define to 1 if you have the <asm/types.h> header file. */
#define HAVE_ASM_TYPES_H 1
+/* Define to 1 if the compiler supports _Thread_local. */
+#define HAVE_CC_THREAD_LOCAL 1
+
/* Define to 1 if the system has the type `nfds_t'. */
#define HAVE_NFDS_T 1