X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Fcommon%2Fthread-id.h;h=690fdf009677f714918f738e755c53584e73c305;hp=04db5bb5aa3d25fdc8120d5edc0053e6f6f409d6;hb=09bdef43191a9de4bcc770ad680fa20776a8f683;hpb=b10602e3b14361be848e44953b97c21dff1dc5ae 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