static
size_t vtid_get_size(void *priv __attribute__((unused)),
+ struct lttng_ust_probe_ctx *probe_ctx __attribute__((unused)),
size_t offset)
{
size_t size = 0;
static
void vtid_record(void *priv __attribute__((unused)),
- struct lttng_ust_ring_buffer_ctx *ctx,
- struct lttng_ust_channel_buffer *chan)
+ struct lttng_ust_probe_ctx *probe_ctx __attribute__((unused)),
+ struct lttng_ust_ring_buffer_ctx *ctx,
+ struct lttng_ust_channel_buffer *chan)
{
pid_t vtid = wrapper_getvtid();
static
void vtid_get_value(void *priv __attribute__((unused)),
+ struct lttng_ust_probe_ctx *probe_ctx __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = wrapper_getvtid();
lttng_ust_static_type_integer(sizeof(pid_t) * CHAR_BIT,
lttng_ust_rb_alignof(pid_t) * CHAR_BIT,
lttng_ust_is_signed_type(pid_t),
- BYTE_ORDER, 10),
+ LTTNG_UST_BYTE_ORDER, 10),
false, false),
vtid_get_size,
vtid_record,
}
/*
- * Force a read (imply TLS fixup for dlopen) of TLS variables.
+ * Force a read (imply TLS allocation for dlopen) of TLS variables.
*/
-void lttng_fixup_vtid_tls(void)
+void lttng_ust_vtid_init_thread(int flags)
{
asm volatile ("" : : "m" (URCU_TLS(cached_vtid)));
+ if (flags & LTTNG_UST_INIT_THREAD_CONTEXT_CACHE)
+ (void)wrapper_getvtid();
}