Move alignment into event write callback
[lttng-modules.git] / src / lttng-context-pid.c
index e3e962d666092124748a9660eda47f2938967333..5bcbe00c57e6dbc4ae15cb3681070955823551af 100644 (file)
@@ -17,7 +17,7 @@
 #include <lttng/tracer.h>
 
 static
-size_t pid_get_size(void *priv, struct lttng_probe_ctx *probe_ctx, size_t offset)
+size_t pid_get_size(void *priv, struct lttng_kernel_probe_ctx *probe_ctx, size_t offset)
 {
        size_t size = 0;
 
@@ -27,20 +27,19 @@ size_t pid_get_size(void *priv, struct lttng_probe_ctx *probe_ctx, size_t offset
 }
 
 static
-void pid_record(void *priv, struct lttng_probe_ctx *probe_ctx,
-               struct lib_ring_buffer_ctx *ctx,
-               struct lttng_channel *chan)
+void pid_record(void *priv, struct lttng_kernel_probe_ctx *probe_ctx,
+               struct lttng_kernel_ring_buffer_ctx *ctx,
+               struct lttng_kernel_channel_buffer *chan)
 {
        pid_t pid;
 
        pid = task_tgid_nr(current);
-       lib_ring_buffer_align_ctx(ctx, lttng_alignof(pid));
-       chan->ops->event_write(ctx, &pid, sizeof(pid));
+       chan->ops->event_write(ctx, &pid, sizeof(pid), lttng_alignof(pid));
 }
 
 static
 void pid_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 = task_tgid_nr(current);
This page took 0.026244 seconds and 4 git commands to generate.