} payload;
int ret;
- if (!ACCESS_ONCE(chan->session->active))
+ if (unlikely(!ACCESS_ONCE(chan->session->active)))
return;
+ if (unlikely(!ACCESS_ONCE(chan->enabled)))
+ return;
+ if (unlikely(!ACCESS_ONCE(event->enabled)))
+ return;
+
lib_ring_buffer_ctx_init(&ctx, chan->chan, event,
sizeof(payload), ltt_alignof(payload), -1);
ret = chan->ops->event_reserve(&ctx, event->id);