]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
threads: provide SCGetThreadIdLong for SunOS
authorVictor Julien <victor@inliniac.net>
Mon, 5 Sep 2016 08:15:52 +0000 (10:15 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 5 Sep 2016 09:49:48 +0000 (11:49 +0200)
src/threads.h

index 0a843b7ff034dcc1310999261937bcfa900dcb09..213b064243b397ce965098705f70889d200bdabc 100644 (file)
@@ -243,6 +243,14 @@ enum {
     u_long tid = (u_long)tpid; \
     tid; \
 })
+#elif defined(sun)
+#include <thread.h>
+#define SCGetThreadIdLong(...) ({ \
+    thread_t tmpthid = thr_self(); \
+    u_long tid = (u_long)tmpthid; \
+    tid; \
+})
+
 #else
 #define SCGetThreadIdLong(...) ({ \
    pid_t tmpthid; \