X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=libringbuffer%2Fring_buffer_backend.c;h=f2169aa7b83e3e331429e7707bbd08824bd9a1cb;hb=c1fca4572d4458b2e6e96752f9efc595c5f72405;hp=466552debaf89c997a27a9a5679aceb52ce8f691;hpb=4cfec15c93af7e0cfe3ce769ee90486bb8ab7c37;p=lttng-ust.git diff --git a/libringbuffer/ring_buffer_backend.c b/libringbuffer/ring_buffer_backend.c index 466552de..f2169aa7 100644 --- a/libringbuffer/ring_buffer_backend.c +++ b/libringbuffer/ring_buffer_backend.c @@ -8,9 +8,9 @@ #include -#include "ust/core.h" +#include "lttng/core.h" -#include +#include #include "backend.h" #include "frontend.h" #include "smp.h" @@ -46,7 +46,7 @@ int lib_ring_buffer_backend_allocate(const struct lttng_ust_lib_ring_buffer_conf align_shm(shmobj, __alignof__(struct lttng_ust_lib_ring_buffer_backend_pages_shmp)); set_shmp(bufb->array, zalloc_shm(shmobj, sizeof(struct lttng_ust_lib_ring_buffer_backend_pages_shmp) * num_subbuf_alloc)); - if (unlikely(!shmp(handle, bufb->array))) + if (caa_unlikely(!shmp(handle, bufb->array))) goto array_error; /* @@ -56,7 +56,7 @@ int lib_ring_buffer_backend_allocate(const struct lttng_ust_lib_ring_buffer_conf align_shm(shmobj, PAGE_SIZE); set_shmp(bufb->memory_map, zalloc_shm(shmobj, subbuf_size * num_subbuf_alloc)); - if (unlikely(!shmp(handle, bufb->memory_map))) + if (caa_unlikely(!shmp(handle, bufb->memory_map))) goto memory_map_error; /* Allocate backend pages array elements */ @@ -74,7 +74,7 @@ int lib_ring_buffer_backend_allocate(const struct lttng_ust_lib_ring_buffer_conf set_shmp(bufb->buf_wsb, zalloc_shm(shmobj, sizeof(struct lttng_ust_lib_ring_buffer_backend_subbuffer) * num_subbuf)); - if (unlikely(!shmp(handle, bufb->buf_wsb))) + if (caa_unlikely(!shmp(handle, bufb->buf_wsb))) goto free_array; for (i = 0; i < num_subbuf; i++) @@ -378,7 +378,7 @@ size_t lib_ring_buffer_read(struct lttng_ust_lib_ring_buffer_backend *bufb, size orig_len = len; offset &= chanb->buf_size - 1; - if (unlikely(!len)) + if (caa_unlikely(!len)) return 0; id = bufb->buf_rsb.id; sb_bindex = subbuffer_id_get_index(config, id);