From ef1acdfaeec1941f513d5f98fd54bda3c8388a7d Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 5 Sep 2016 10:15:52 +0200 Subject: [PATCH] threads: provide SCGetThreadIdLong for SunOS --- src/threads.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/threads.h b/src/threads.h index 0a843b7ff0..213b064243 100644 --- a/src/threads.h +++ b/src/threads.h @@ -243,6 +243,14 @@ enum { u_long tid = (u_long)tpid; \ tid; \ }) +#elif defined(sun) +#include +#define SCGetThreadIdLong(...) ({ \ + thread_t tmpthid = thr_self(); \ + u_long tid = (u_long)tmpthid; \ + tid; \ +}) + #else #define SCGetThreadIdLong(...) ({ \ pid_t tmpthid; \