- if (caa_unlikely(!URCU_TLS(cached_vtid)))
- URCU_TLS(cached_vtid) = gettid();
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(URCU_TLS(cached_vtid)));
- chan->ops->event_write(ctx, &URCU_TLS(cached_vtid),
- sizeof(URCU_TLS(cached_vtid)));
+ pid_t vtid = wrapper_getvtid();
+
+ lib_ring_buffer_align_ctx(ctx, lttng_alignof(vtid));
+ chan->ops->event_write(ctx, &vtid, sizeof(vtid));