X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fringbuffer-config.h;h=650b56b250db4dbb6d2889bff659c74fe1c20970;hb=a8909ba54718ed54cefb1b839a5d41a065df09f9;hp=24e7dbeb6bf9e07fc8d1521a11ace7e8a830a016;hpb=9b33aac411033000adafce04f947c7aca892c342;p=lttng-ust.git diff --git a/include/lttng/ringbuffer-config.h b/include/lttng/ringbuffer-config.h index 24e7dbeb..650b56b2 100644 --- a/include/lttng/ringbuffer-config.h +++ b/include/lttng/ringbuffer-config.h @@ -27,6 +27,7 @@ #include #include #include "lttng/align.h" +#include struct lttng_ust_lib_ring_buffer; struct channel; @@ -228,6 +229,11 @@ struct lttng_ust_lib_ring_buffer_ctx { * @largest_align: largest alignment within data payload types * @cpu: processor id */ +static inline lttng_ust_notrace +void lib_ring_buffer_ctx_init(struct lttng_ust_lib_ring_buffer_ctx *ctx, + struct channel *chan, void *priv, + size_t data_size, int largest_align, + int cpu, struct lttng_ust_shm_handle *handle); static inline void lib_ring_buffer_ctx_init(struct lttng_ust_lib_ring_buffer_ctx *ctx, struct channel *chan, void *priv, @@ -275,6 +281,8 @@ void lib_ring_buffer_ctx_init(struct lttng_ust_lib_ring_buffer_ctx *ctx, * Calculate the offset needed to align the type. * size_of_type must be non-zero. */ +static inline lttng_ust_notrace +unsigned int lib_ring_buffer_align(size_t align_drift, size_t size_of_type); static inline unsigned int lib_ring_buffer_align(size_t align_drift, size_t size_of_type) { @@ -289,6 +297,8 @@ unsigned int lib_ring_buffer_align(size_t align_drift, size_t size_of_type) * Calculate the offset needed to align the type. * size_of_type must be non-zero. */ +static inline lttng_ust_notrace +unsigned int lib_ring_buffer_align(size_t align_drift, size_t size_of_type); static inline unsigned int lib_ring_buffer_align(size_t align_drift, size_t size_of_type) { @@ -301,6 +311,9 @@ unsigned int lib_ring_buffer_align(size_t align_drift, size_t size_of_type) * lib_ring_buffer_align_ctx - Align context offset on "alignment" * @ctx: ring buffer context. */ +static inline lttng_ust_notrace +void lib_ring_buffer_align_ctx(struct lttng_ust_lib_ring_buffer_ctx *ctx, + size_t alignment); static inline void lib_ring_buffer_align_ctx(struct lttng_ust_lib_ring_buffer_ctx *ctx, size_t alignment) @@ -313,6 +326,10 @@ void lib_ring_buffer_align_ctx(struct lttng_ust_lib_ring_buffer_ctx *ctx, * lib_ring_buffer_check_config() returns 0 on success. * Used internally to check for valid configurations at channel creation. */ +static inline lttng_ust_notrace +int lib_ring_buffer_check_config(const struct lttng_ust_lib_ring_buffer_config *config, + unsigned int switch_timer_interval, + unsigned int read_timer_interval); static inline int lib_ring_buffer_check_config(const struct lttng_ust_lib_ring_buffer_config *config, unsigned int switch_timer_interval,