Compat layer for gettid
[lttng-ust.git] / liblttng-ust / lttng-context-vtid.c
index 6f7e078d22d2910072748adfd0ee59b8c9a695b4..3fe86405c112307a47e6c1abe0a9c62fe8b2175b 100644 (file)
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
 #include <lttng/ringbuffer-config.h>
-
-#ifdef __linux__
-#include <syscall.h>
-#endif
-
-#if defined(_syscall0)
-_syscall0(pid_t, gettid)
-#elif defined(__NR_gettid)
-static inline pid_t gettid(void)
-{
-       return syscall(__NR_gettid);
-}
-#else
-#warning "use pid as tid"
-static inline pid_t gettid(void)
-{
-       return getpid();
-}
-#endif
+#include <lttng/ust-tid.h>
 
 /*
  * We cache the result to ensure we don't trigger a system call for
This page took 0.023824 seconds and 4 git commands to generate.