/* Mandatory callbacks */
/* A static inline version is also required for fast path */
- u64 (*ring_buffer_clock_read) (struct channel *chan);
+ uint64_t (*ring_buffer_clock_read) (struct channel *chan);
size_t (*record_header_size) (const struct lttng_ust_lib_ring_buffer_config *config,
struct channel *chan, size_t offset,
size_t *pre_header_padding,
/* Slow path only, at subbuffer switch */
size_t (*subbuffer_header_size) (void);
- void (*buffer_begin) (struct lttng_ust_lib_ring_buffer *buf, u64 tsc,
+ void (*buffer_begin) (struct lttng_ust_lib_ring_buffer *buf, uint64_t tsc,
unsigned int subbuf_idx,
struct lttng_ust_shm_handle *handle);
- void (*buffer_end) (struct lttng_ust_lib_ring_buffer *buf, u64 tsc,
+ void (*buffer_end) (struct lttng_ust_lib_ring_buffer *buf, uint64_t tsc,
unsigned int subbuf_idx, unsigned long data_size,
struct lttng_ust_shm_handle *handle);
void (*record_get) (const struct lttng_ust_lib_ring_buffer_config *config,
struct channel *chan, struct lttng_ust_lib_ring_buffer *buf,
size_t offset, size_t *header_len,
- size_t *payload_len, u64 *timestamp,
+ size_t *payload_len, uint64_t *timestamp,
struct lttng_ust_shm_handle *handle);
};
* prior to record header alignment
* padding.
*/
- u64 tsc; /* time-stamp counter value */
+ uint64_t tsc; /* time-stamp counter value */
unsigned int rflags; /* reservation flags */
};
* Dual LGPL v2.1/GPL v2 license.
*/
+#include <limits.h>
#include "shm_internal.h"
struct lttng_ust_lib_ring_buffer_backend_pages {
unsigned int buf_size_order; /* Order of buffer size */
int extra_reader_sb:1; /* Bool: has extra reader subbuffer */
unsigned long num_subbuf; /* Number of sub-buffers for writer */
- u64 start_tsc; /* Channel creation TSC value */
+ uint64_t start_tsc; /* Channel creation TSC value */
DECLARE_SHMP(void *, priv_data);/* Client-specific information */
struct lttng_ust_lib_ring_buffer_config config; /* Ring buffer configuration */
char name[NAME_MAX]; /* Channel name */
#if (CAA_BITS_PER_LONG == 32)
static inline
void save_last_tsc(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer *buf, u64 tsc)
+ struct lttng_ust_lib_ring_buffer *buf, uint64_t tsc)
{
if (config->tsc_bits == 0 || config->tsc_bits == 64)
return;
static inline
int last_tsc_overflow(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer *buf, u64 tsc)
+ struct lttng_ust_lib_ring_buffer *buf, uint64_t tsc)
{
unsigned long tsc_shifted;
#else
static inline
void save_last_tsc(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer *buf, u64 tsc)
+ struct lttng_ust_lib_ring_buffer *buf, uint64_t tsc)
{
if (config->tsc_bits == 0 || config->tsc_bits == 64)
return;
static inline
int last_tsc_overflow(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer *buf, u64 tsc)
+ struct lttng_ust_lib_ring_buffer *buf, uint64_t tsc)
{
if (config->tsc_bits == 0 || config->tsc_bits == 64)
return 0;
{
unsigned long old_commit_count = commit_count
- chan->backend.subbuf_size;
- u64 tsc;
+ uint64_t tsc;
/* Check if all commits have been done */
if (caa_unlikely((buf_trunc(offset, chan) >> chan->backend.num_subbuf_order)
#include "lttng/core.h"
-#include "uatomic.h"
#include <lttng/ringbuffer-config.h>
+#include "vatomic.h"
#include "backend.h"
#include "frontend.h"
#include "smp.h"
#include <urcu/compiler.h>
#include <urcu/ref.h>
-#include "vatomic.h"
#include "smp.h"
#include <lttng/ringbuffer-config.h>
+#include "vatomic.h"
#include "backend.h"
#include "frontend.h"
#include "shm.h"
struct channel *chan = caa_container_of(chanb, struct channel, backend);
void *priv = channel_get_private(chan);
size_t subbuf_header_size;
- u64 tsc;
+ uint64_t tsc;
int ret;
/* Test for cpu hotplug */
void lib_ring_buffer_switch_old_start(struct lttng_ust_lib_ring_buffer *buf,
struct channel *chan,
struct switch_offsets *offsets,
- u64 tsc,
+ uint64_t tsc,
struct lttng_ust_shm_handle *handle)
{
const struct lttng_ust_lib_ring_buffer_config *config = &chan->backend.config;
void lib_ring_buffer_switch_old_end(struct lttng_ust_lib_ring_buffer *buf,
struct channel *chan,
struct switch_offsets *offsets,
- u64 tsc,
+ uint64_t tsc,
struct lttng_ust_shm_handle *handle)
{
const struct lttng_ust_lib_ring_buffer_config *config = &chan->backend.config;
void lib_ring_buffer_switch_new_start(struct lttng_ust_lib_ring_buffer *buf,
struct channel *chan,
struct switch_offsets *offsets,
- u64 tsc,
+ uint64_t tsc,
struct lttng_ust_shm_handle *handle)
{
const struct lttng_ust_lib_ring_buffer_config *config = &chan->backend.config;
void lib_ring_buffer_switch_new_end(struct lttng_ust_lib_ring_buffer *buf,
struct channel *chan,
struct switch_offsets *offsets,
- u64 tsc,
+ uint64_t tsc,
struct lttng_ust_shm_handle *handle)
{
const struct lttng_ust_lib_ring_buffer_config *config = &chan->backend.config;
struct lttng_ust_lib_ring_buffer *buf,
struct channel *chan,
struct switch_offsets *offsets,
- u64 *tsc)
+ uint64_t *tsc)
{
const struct lttng_ust_lib_ring_buffer_config *config = &chan->backend.config;
unsigned long off;
const struct lttng_ust_lib_ring_buffer_config *config = &chan->backend.config;
struct switch_offsets offsets;
unsigned long oldidx;
- u64 tsc;
+ uint64_t tsc;
offsets.size = 0;