Fix: namespace our gettid wrapper
[lttng-tools.git] / src / common / compat / tid.h
index 40f562f9749668f7f1ebbcea4b6e1d0513ca22c0..15f9fdc7a467d5f1b294fdb757cddc1fe297d14f 100644 (file)
 #include <syscall.h>
 #endif
 
-#if defined(_syscall0)
-_syscall0(pid_t, gettid)
-#elif defined(__NR_gettid)
+#if defined(__NR_gettid)
+
 #include <unistd.h>
-static inline pid_t gettid(void)
+static inline pid_t lttng_gettid(void)
 {
        return syscall(__NR_gettid);
 }
+
 #else
+
 #include <sys/types.h>
 #include <unistd.h>
 
 /* Fall-back on getpid for tid if not available. */
-static inline pid_t gettid(void)
+static inline pid_t lttng_gettid(void)
 {
        return getpid();
 }
+
 #endif
 
 #endif /* LTTNG_TID_H */
This page took 0.023168 seconds and 4 git commands to generate.