There are additional missing URCU_TLS() accessors in the refactoring of
the ring buffer context. Moreover, when indexing an array, it must be
done outside of the URCU_TLS() accessor.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ief9d31e26e16fa5decf797b23ed6304b5a8c79ca
if (nesting < 0)
return -EPERM;
- private_ctx = &URCU_TLS(private_ctx_stack[nesting]);
+ private_ctx = &URCU_TLS(private_ctx_stack)[nesting];
memset(private_ctx, 0, sizeof(*private_ctx));
private_ctx->pub = ctx;
private_ctx->chan = lttng_chan->priv->rb_chan;
{
int ret;
- memset(&private_ctx, 0, sizeof(private_ctx));
- private_ctx.pub = ctx;
- private_ctx.chan = ctx->client_priv;
- ctx->priv = &private_ctx;
+ memset(&URCU_TLS(private_ctx), 0, sizeof(struct lttng_ust_lib_ring_buffer_ctx_private));
+ URCU_TLS(private_ctx).pub = ctx;
+ URCU_TLS(private_ctx).chan = ctx->client_priv;
+ ctx->priv = &URCU_TLS(private_ctx);
ret = lib_ring_buffer_reserve(&client_config, ctx, NULL);
if (ret)
return ret;