+static
+void vtid_get_value(struct lttng_ctx_field *field,
+ struct lttng_probe_ctx *lttng_probe_ctx,
+ union lttng_ctx_value *value)
+{
+ pid_t vtid;
+
+ /*
+ * nsproxy can be NULL when scheduled out of exit.
+ */
+ if (!current->nsproxy)
+ vtid = 0;
+ else
+ vtid = task_pid_vnr(current);
+ value->s64 = vtid;
+}
+