X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=libringbuffer%2Fbackend_internal.h;h=766fde2d30d851d79bcd05770be5b8786c991807;hb=9f5ade14faf36df6429d9c6e1d0360854a5669d0;hp=b8a1699046ff293fc8fc0c2df447fd419753e7a5;hpb=071dec4386ff4c89d8b0f92ab1a8dbf079abd50c;p=lttng-ust.git diff --git a/libringbuffer/backend_internal.h b/libringbuffer/backend_internal.h index b8a16990..766fde2d 100644 --- a/libringbuffer/backend_internal.h +++ b/libringbuffer/backend_internal.h @@ -14,48 +14,55 @@ #include #include -#include +#include +#include "ringbuffer-config.h" #include "backend_types.h" #include "frontend_types.h" #include "shm.h" -#include "ust-helper.h" /* Ring buffer backend API presented to the frontend */ /* Ring buffer and channel backend create/free */ -LTTNG_HIDDEN +__attribute__((visibility("hidden"))) int lib_ring_buffer_backend_create(struct lttng_ust_lib_ring_buffer_backend *bufb, - struct channel_backend *chan, int cpu, + struct channel_backend *chan, + int cpu, struct lttng_ust_shm_handle *handle, struct shm_object *shmobj); -LTTNG_HIDDEN + +__attribute__((visibility("hidden"))) void channel_backend_unregister_notifiers(struct channel_backend *chanb); -LTTNG_HIDDEN + +__attribute__((visibility("hidden"))) void lib_ring_buffer_backend_free(struct lttng_ust_lib_ring_buffer_backend *bufb); -LTTNG_HIDDEN + +__attribute__((visibility("hidden"))) int channel_backend_init(struct channel_backend *chanb, const char *name, const struct lttng_ust_lib_ring_buffer_config *config, size_t subbuf_size, size_t num_subbuf, struct lttng_ust_shm_handle *handle, const int *stream_fds); -LTTNG_HIDDEN + +__attribute__((visibility("hidden"))) void channel_backend_free(struct channel_backend *chanb, struct lttng_ust_shm_handle *handle); -LTTNG_HIDDEN +__attribute__((visibility("hidden"))) void lib_ring_buffer_backend_reset(struct lttng_ust_lib_ring_buffer_backend *bufb, struct lttng_ust_shm_handle *handle); -LTTNG_HIDDEN + +__attribute__((visibility("hidden"))) void channel_backend_reset(struct channel_backend *chanb); -LTTNG_HIDDEN +__attribute__((visibility("hidden"))) int lib_ring_buffer_backend_init(void); -LTTNG_HIDDEN + +__attribute__((visibility("hidden"))) void lib_ring_buffer_backend_exit(void); -LTTNG_HIDDEN +__attribute__((visibility("hidden"))) extern void _lib_ring_buffer_write(struct lttng_ust_lib_ring_buffer_backend *bufb, size_t offset, const void *src, size_t len, ssize_t pagecpy); @@ -236,9 +243,6 @@ struct lttng_ust_lib_ring_buffer_backend_pages * lib_ring_buffer_get_backend_pages_from_ctx(const struct lttng_ust_lib_ring_buffer_config *config, struct lttng_ust_lib_ring_buffer_ctx *ctx) { - if (caa_unlikely(ctx->ctx_len - < sizeof(struct lttng_ust_lib_ring_buffer_ctx))) - return NULL; return ctx->backend_pages; } @@ -282,7 +286,7 @@ void subbuffer_consume_record(const struct lttng_ust_lib_ring_buffer_config *con struct lttng_ust_shm_handle *handle) { unsigned long sb_bindex; - struct channel *chan; + struct lttng_ust_lib_ring_buffer_channel *chan; struct lttng_ust_lib_ring_buffer_backend_pages_shmp *pages_shmp; struct lttng_ust_lib_ring_buffer_backend_pages *backend_pages; @@ -502,7 +506,7 @@ void lib_ring_buffer_set_noref_offset(const struct lttng_ust_lib_ring_buffer_con struct lttng_ust_shm_handle *handle) { struct lttng_ust_lib_ring_buffer_backend_subbuffer *wsb; - struct channel *chan; + struct lttng_ust_lib_ring_buffer_channel *chan; if (config->mode != RING_BUFFER_OVERWRITE) return; @@ -552,7 +556,7 @@ int update_read_sb_index(const struct lttng_ust_lib_ring_buffer_config *config, return -EPERM; if (config->mode == RING_BUFFER_OVERWRITE) { - struct channel *chan; + struct lttng_ust_lib_ring_buffer_channel *chan; /* * Exchange the target writer subbuffer with our own unused