X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=libringbuffer%2Ffrontend_api.h;h=f570cc168174de626d134998571120e8e10a81a7;hb=dc613eb9d0c449f3e988af66b173abefa4b22233;hp=1d8e29493655da9709cec47909167177a7c1bcc6;hpb=1d4981969313da002983ca979bd85c95493f7316;p=ust.git diff --git a/libringbuffer/frontend_api.h b/libringbuffer/frontend_api.h index 1d8e294..f570cc1 100644 --- a/libringbuffer/frontend_api.h +++ b/libringbuffer/frontend_api.h @@ -253,7 +253,7 @@ void lib_ring_buffer_commit(const struct lib_ring_buffer_config *config, */ cmm_smp_wmb(); - v_add(config, ctx->slot_size, &shmp(handle, buf->commit_hot)[endidx].cc); + v_add(config, ctx->slot_size, &shmp_index(handle, buf->commit_hot, endidx)->cc); /* * commit count read can race with concurrent OOO commit count updates. @@ -273,7 +273,7 @@ void lib_ring_buffer_commit(const struct lib_ring_buffer_config *config, * count reaches back the reserve offset for a specific sub-buffer, * which is completely independent of the order. */ - commit_count = v_read(config, &shmp(handle, buf->commit_hot)[endidx].cc); + commit_count = v_read(config, &shmp_index(handle, buf->commit_hot, endidx)->cc); lib_ring_buffer_check_deliver(config, buf, chan, offset_end - 1, commit_count, endidx, handle);