Fix: liblttng-ust-fork Makefile flags mismatch
[lttng-ust.git] / liblttng-ust / lttng-context-vtid.c
index d5664c951cf708ff2b7ac6e9be4ca3b61fbbe87b..dd443774d4c9ef35386cda1d1c4f3e067682a381 100644 (file)
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
 #include <lttng/ringbuffer-config.h>
-#include "ltt-tracer-core.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>
+#include "lttng-tracer-core.h"
 
 /*
  * We cache the result to ensure we don't trigger a system call for
@@ -75,7 +57,7 @@ size_t vtid_get_size(size_t offset)
 static
 void vtid_record(struct lttng_ctx_field *field,
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
-                struct ltt_channel *chan)
+                struct lttng_channel *chan)
 {
        if (caa_unlikely(!cached_vtid))
                cached_vtid = gettid();
This page took 0.026819 seconds and 4 git commands to generate.