Rename all 'fixup_tls' functions to 'alloc_tls'
[lttng-ust.git] / src / lib / lttng-ust / lttng-context-net-ns.c
index e7c8f9f9c5a181a830af4d2544980c5600e0465c..960591c2586e41c0543d2aa975d6c9da5e7a13ff 100644 (file)
 #include <unistd.h>
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
-#include <lttng/ringbuffer-context.h>
+#include <lttng/ust-ringbuffer-context.h>
 #include "common/compat/tid.h"
 #include <urcu/tls-compat.h>
 
 #include "context-internal.h"
 #include "lttng-tracer-core.h"
-#include "ns.h"
+#include "common/ns.h"
 
 /*
  * We cache the result to ensure we don't stat(2) the proc filesystem on
@@ -91,19 +91,21 @@ void lttng_context_net_ns_reset(void)
 
 static
 size_t net_ns_get_size(void *priv __attribute__((unused)),
+               struct lttng_ust_probe_ctx *probe_ctx __attribute__((unused)),
                size_t offset)
 {
        size_t size = 0;
 
-       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(ino_t));
+       size += lttng_ust_ring_buffer_align(offset, lttng_ust_rb_alignof(ino_t));
        size += sizeof(ino_t);
        return size;
 }
 
 static
 void net_ns_record(void *priv __attribute__((unused)),
-                struct lttng_ust_lib_ring_buffer_ctx *ctx,
-                struct lttng_ust_channel_buffer *chan)
+               struct lttng_ust_probe_ctx *probe_ctx __attribute__((unused)),
+               struct lttng_ust_ring_buffer_ctx *ctx,
+               struct lttng_ust_channel_buffer *chan)
 {
        ino_t net_ns;
 
@@ -113,9 +115,10 @@ void net_ns_record(void *priv __attribute__((unused)),
 
 static
 void net_ns_get_value(void *priv __attribute__((unused)),
+               struct lttng_ust_probe_ctx *probe_ctx __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
-       value->u.s64 = get_net_ns();
+       value->u.u64 = get_net_ns();
 }
 
 static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
@@ -123,7 +126,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(ino_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(ino_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        net_ns_get_size,
        net_ns_record,
@@ -148,9 +151,9 @@ error_find_context:
 }
 
 /*
- *  * Force a read (imply TLS fixup for dlopen) of TLS variables.
- *   */
-void lttng_fixup_net_ns_tls(void)
+ * Force a read (imply TLS allocation for dlopen) of TLS variables.
+ */
+void lttng_net_ns_alloc_tls(void)
 {
        asm volatile ("" : : "m" (URCU_TLS(cached_net_ns)));
 }
This page took 0.026015 seconds and 4 git commands to generate.