Move alignment into event write callback
[lttng-modules.git] / src / lttng-context-uid.c
index 86d999afdfac324f3843394ccf4b263f86d132cd..b4b5b6ce4acf2c5c3ed3c152c937273f1de8b400 100644 (file)
@@ -19,7 +19,7 @@
 #include <wrapper/user_namespace.h>
 
 static
-size_t uid_get_size(void *priv, struct lttng_probe_ctx *probe_ctx, size_t offset)
+size_t uid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset)
 {
        size_t size = 0;
 
@@ -29,20 +29,19 @@ size_t uid_get_size(void *priv, struct lttng_probe_ctx *probe_ctx, size_t offset
 }
 
 static
-void uid_record(void *priv, struct lttng_probe_ctx *probe_ctx,
-                struct lib_ring_buffer_ctx *ctx,
-                struct lttng_channel *chan)
+void uid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx,
+                struct lttng_kernel_ring_buffer_ctx *ctx,
+                struct lttng_kernel_channel_buffer *chan)
 {
        uid_t uid;
 
        uid = lttng_current_uid();
-       lib_ring_buffer_align_ctx(ctx, lttng_alignof(uid));
-       chan->ops->event_write(ctx, &uid, sizeof(uid));
+       chan->ops->event_write(ctx, &uid, sizeof(uid), lttng_alignof(uid));
 }
 
 static
 void uid_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_uid();
This page took 0.025254 seconds and 4 git commands to generate.