Add 'ctf_unused' tracepoint field type
[lttng-ust.git] / liblttng-ust / lttng-context-mnt-ns.c
index 2606ff3ce486ce8fc74ed0ef2969bfd7e810cf64..8d4bdb1debe9acb61b6a715fe4b37eec1b11dce9 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #define _LGPL_SOURCE
+#include <limits.h>
 #include <stddef.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -72,29 +73,29 @@ void lttng_context_mnt_ns_reset(void)
 }
 
 static
-size_t mnt_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t mnt_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+               size_t offset)
 {
        size_t size = 0;
 
-       size += lib_ring_buffer_align(offset, lttng_alignof(ino_t));
+       size += lttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb_alignof(ino_t));
        size += sizeof(ino_t);
        return size;
 }
 
 static
-void mnt_ns_record(struct lttng_ust_ctx_field *field,
+void mnt_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
                 struct lttng_ust_lib_ring_buffer_ctx *ctx,
-                struct lttng_channel *chan)
+                struct lttng_ust_channel_buffer *chan)
 {
        ino_t mnt_ns;
 
        mnt_ns = get_mnt_ns();
-       lib_ring_buffer_align_ctx(ctx, lttng_alignof(mnt_ns));
-       chan->ops->event_write(ctx, &mnt_ns, sizeof(mnt_ns));
+       chan->ops->event_write(ctx, &mnt_ns, sizeof(mnt_ns), lttng_ust_rb_alignof(mnt_ns));
 }
 
 static
-void mnt_ns_get_value(struct lttng_ust_ctx_field *field,
+void mnt_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
                struct lttng_ust_ctx_value *value)
 {
        value->u.s64 = get_mnt_ns();
@@ -107,8 +108,8 @@ int lttng_add_mnt_ns_to_ctx(struct lttng_ust_ctx **ctx)
        int ret;
 
        type = lttng_ust_create_type_integer(sizeof(ino_t) * CHAR_BIT,
-                       lttng_alignof(ino_t) * CHAR_BIT,
-                       lttng_is_signed_type(ino_t),
+                       lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
+                       lttng_ust_is_signed_type(ino_t),
                        BYTE_ORDER, 10);
        if (!type)
                return -ENOMEM;
This page took 0.04063 seconds and 4 git commands to generate.