X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Fcommon%2Fthread-id.h;h=690fdf009677f714918f738e755c53584e73c305;hp=04db5bb5aa3d25fdc8120d5edc0053e6f6f409d6;hb=6acc6ad438eacc973c610e7ec8e76c9cd83c6286;hpb=6bbcdc421d5614038a1dc8c5645c334372762087 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