chan->ops->event_write(ctx, &pid, sizeof(pid));
}
+static
+void pid_get_value(struct lttng_ctx_field *field,
+ struct lttng_probe_ctx *lttng_probe_ctx,
+ union lttng_ctx_value *value)
+{
+ value->s64 = task_tgid_nr(current);
+}
+
int lttng_add_pid_to_ctx(struct lttng_ctx **ctx)
{
struct lttng_ctx_field *field;
field->event_field.type.u.basic.integer.encoding = lttng_encode_none;
field->get_size = pid_get_size;
field->record = pid_record;
+ field->get_value = pid_get_value;
lttng_context_update(*ctx);
wrapper_vmalloc_sync_all();
return 0;