X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Fringbuffer%2Fconfig.h;h=34f8a5da22e08935c659c8425d47e35184f1a2ff;hb=724644d93214395f1a732a86128dc980ba95c3c5;hp=a6821267caa0dce139327e2df5022415ece3c8db;hpb=860c213b645593fa19d7a3abf7ffdd1282f0a1c6;p=lttng-modules.git diff --git a/include/ringbuffer/config.h b/include/ringbuffer/config.h index a6821267..34f8a5da 100644 --- a/include/ringbuffer/config.h +++ b/include/ringbuffer/config.h @@ -16,9 +16,9 @@ #include #include -struct lib_ring_buffer; +struct lttng_kernel_ring_buffer; struct lttng_kernel_ring_buffer_channel; -struct lib_ring_buffer_config; +struct lttng_kernel_ring_buffer_config; struct lttng_kernel_ring_buffer_ctx; struct lttng_kernel_ring_buffer_ctx_private; @@ -28,12 +28,12 @@ struct lttng_kernel_ring_buffer_ctx_private; * provided as inline functions too. These may simply return 0 if not used by * the client. */ -struct lib_ring_buffer_client_cb { +struct lttng_kernel_ring_buffer_client_cb { /* Mandatory callbacks */ /* A static inline version is also required for fast path */ u64 (*ring_buffer_clock_read) (struct lttng_kernel_ring_buffer_channel *chan); - size_t (*record_header_size) (const struct lib_ring_buffer_config *config, + size_t (*record_header_size) (const struct lttng_kernel_ring_buffer_config *config, struct lttng_kernel_ring_buffer_channel *chan, size_t offset, size_t *pre_header_padding, struct lttng_kernel_ring_buffer_ctx *ctx, @@ -41,29 +41,29 @@ struct lib_ring_buffer_client_cb { /* Slow path only, at subbuffer switch */ size_t (*subbuffer_header_size) (void); - void (*buffer_begin) (struct lib_ring_buffer *buf, u64 tsc, + void (*buffer_begin) (struct lttng_kernel_ring_buffer *buf, u64 tsc, unsigned int subbuf_idx); - void (*buffer_end) (struct lib_ring_buffer *buf, u64 tsc, + void (*buffer_end) (struct lttng_kernel_ring_buffer *buf, u64 tsc, unsigned int subbuf_idx, unsigned long data_size); /* Optional callbacks (can be set to NULL) */ /* Called at buffer creation/finalize */ - int (*buffer_create) (struct lib_ring_buffer *buf, void *priv, + int (*buffer_create) (struct lttng_kernel_ring_buffer *buf, void *priv, int cpu, const char *name); /* * Clients should guarantee that no new reader handle can be opened * after finalize. */ - void (*buffer_finalize) (struct lib_ring_buffer *buf, void *priv, int cpu); + void (*buffer_finalize) (struct lttng_kernel_ring_buffer *buf, void *priv, int cpu); /* * Extract header length, payload length and timestamp from event * record. Used by buffer iterators. Timestamp is only used by channel * iterator. */ - void (*record_get) (const struct lib_ring_buffer_config *config, - struct lttng_kernel_ring_buffer_channel *chan, struct lib_ring_buffer *buf, + void (*record_get) (const struct lttng_kernel_ring_buffer_config *config, + struct lttng_kernel_ring_buffer_channel *chan, struct lttng_kernel_ring_buffer *buf, size_t offset, size_t *header_len, size_t *payload_len, u64 *timestamp); }; @@ -109,7 +109,7 @@ struct lib_ring_buffer_client_cb { * RING_BUFFER_WAKEUP_NONE does not perform any wakeup whatsoever. The client * has the responsibility to perform wakeups. */ -struct lib_ring_buffer_config { +struct lttng_kernel_ring_buffer_config { enum { RING_BUFFER_ALLOC_PER_CPU, RING_BUFFER_ALLOC_GLOBAL, @@ -154,7 +154,7 @@ struct lib_ring_buffer_config { * 0 and 64 disable the timestamp compression scheme. */ unsigned int tsc_bits; - struct lib_ring_buffer_client_cb cb; + struct lttng_kernel_ring_buffer_client_cb cb; }; /* @@ -184,11 +184,11 @@ struct lttng_kernel_ring_buffer_ctx_private { u64 tsc; /* time-stamp counter value */ unsigned int rflags; /* reservation flags */ - struct lib_ring_buffer *buf; /* + struct lttng_kernel_ring_buffer *buf; /* * buffer corresponding to processor id * for this channel */ - struct lib_ring_buffer_backend_pages *backend_pages; + struct lttng_kernel_ring_buffer_backend_pages *backend_pages; }; /* @@ -306,7 +306,7 @@ void lib_ring_buffer_align_ctx(struct lttng_kernel_ring_buffer_ctx *ctx, * Used internally to check for valid configurations at channel creation. */ static inline -int lib_ring_buffer_check_config(const struct lib_ring_buffer_config *config, +int lib_ring_buffer_check_config(const struct lttng_kernel_ring_buffer_config *config, unsigned int switch_timer_interval, unsigned int read_timer_interval) {