From: Michael Jeanson Date: Tue, 29 Sep 2015 10:38:08 +0000 (-0400) Subject: Port: Add Solaris support to tests/common/thread-id.h X-Git-Tag: v0.9.0~10 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=09bdef43191a9de4bcc770ad680fa20776a8f683;p=userspace-rcu.git Port: Add Solaris support to tests/common/thread-id.h Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/common/thread-id.h b/tests/common/thread-id.h index 04db5bb..690fdf0 100644 --- a/tests/common/thread-id.h +++ b/tests/common/thread-id.h @@ -50,6 +50,14 @@ unsigned long urcu_get_thread_id(void) { return (unsigned long) pthread_getthreadid_np(); } +#elif defined(__sun__) +#include + +static inline +unsigned long urcu_get_thread_id(void) +{ + return (unsigned long) pthread_self(); +} #else # warning "use pid as thread ID" static inline