Move alignment into event write callback
[lttng-modules.git] / src / lttng-context-vegid.c
index 87c53baff039edbb3e4a05066257ce4c9a010dcb..6aee7cbcd00f048b3939111b6453dbd0d7e46024 100644 (file)
@@ -19,7 +19,7 @@
 #include <wrapper/user_namespace.h>
 
 static
-size_t vegid_get_size(void *priv, struct lttng_probe_ctx *probe_ctx, size_t offset)
+size_t vegid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset)
 {
        size_t size = 0;
 
@@ -29,20 +29,19 @@ size_t vegid_get_size(void *priv, struct lttng_probe_ctx *probe_ctx, size_t offs
 }
 
 static
-void vegid_record(void *priv, struct lttng_probe_ctx *probe_ctx,
-                struct lib_ring_buffer_ctx *ctx,
-                struct lttng_channel *chan)
+void vegid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx,
+                struct lttng_kernel_ring_buffer_ctx *ctx,
+                struct lttng_kernel_channel_buffer *chan)
 {
        gid_t vegid;
 
        vegid = lttng_current_vegid();
-       lib_ring_buffer_align_ctx(ctx, lttng_alignof(vegid));
-       chan->ops->event_write(ctx, &vegid, sizeof(vegid));
+       chan->ops->event_write(ctx, &vegid, sizeof(vegid), lttng_alignof(vegid));
 }
 
 static
 void vegid_get_value(void *priv,
-               struct lttng_probe_ctx *lttng_probe_ctx,
+               struct lttng_kernel_probe_ctx *lttng_probe_ctx,
                struct lttng_ctx_value *value)
 {
        value->u.s64 = lttng_current_vegid();
This page took 0.024092 seconds and 4 git commands to generate.