X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.h;h=d748582ef9254f3d9f5c32167d1825e3176dd1ea;hb=331744e34f56a5aec69b05d356d6901e67926acc;hp=6b507ed99f9a9fa1f2640f0d7a06f25315fd46ee;hpb=e316aad5fbbe3782872083cb68dfdd58bccea811;p=lttng-tools.git diff --git a/src/common/ust-consumer/ust-consumer.h b/src/common/ust-consumer/ust-consumer.h index 6b507ed99..d748582ef 100644 --- a/src/common/ust-consumer/ust-consumer.h +++ b/src/common/ust-consumer/ust-consumer.h @@ -26,23 +26,10 @@ #ifdef HAVE_LIBLTTNG_UST_CTL -/* - * Take a snapshot for a specific fd - * - * Returns 0 on success, < 0 on error - */ -int lttng_ustconsumer_take_snapshot(struct lttng_consumer_local_data *ctx, - struct lttng_consumer_stream *stream); +int lttng_ustconsumer_take_snapshot(struct lttng_consumer_stream *stream); -/* - * Get the produced position - * - * Returns 0 on success, < 0 on error - */ int lttng_ustconsumer_get_produced_snapshot( - struct lttng_consumer_local_data *ctx, - struct lttng_consumer_stream *stream, - unsigned long *pos); + struct lttng_consumer_stream *stream, unsigned long *pos); int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx, int sock, struct pollfd *consumer_sockpoll); @@ -58,9 +45,18 @@ int lttng_ustconsumer_on_recv_stream(struct lttng_consumer_stream *stream); void lttng_ustconsumer_on_stream_hangup(struct lttng_consumer_stream *stream); -extern int lttng_ustctl_get_mmap_read_offset( - struct lttng_ust_shm_handle *handle, - struct lttng_ust_lib_ring_buffer *buf, unsigned long *off); +int lttng_ustctl_get_mmap_read_offset(struct lttng_consumer_stream *stream, + unsigned long *off); +void *lttng_ustctl_get_mmap_base(struct lttng_consumer_stream *stream); +int lttng_ustconsumer_data_pending(struct lttng_consumer_stream *stream); +void lttng_ustconsumer_close_metadata(struct lttng_ht *ht); +void lttng_ustconsumer_close_stream_wakeup(struct lttng_consumer_stream *stream); +int lttng_ustconsumer_recv_metadata(int sock, uint64_t key, uint64_t offset, + uint64_t len, struct lttng_consumer_channel *channel); +int lttng_ustconsumer_push_metadata(struct lttng_consumer_channel *metadata, + const char *metadata_str, uint64_t target_offset, uint64_t len); +int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx, + struct lttng_consumer_channel *channel); #else /* HAVE_LIBLTTNG_UST_CTL */ @@ -83,17 +79,14 @@ ssize_t lttng_ustconsumer_on_read_subbuffer_splice( } static inline -int lttng_ustconsumer_take_snapshot(struct lttng_consumer_local_data *ctx, - struct lttng_consumer_stream *stream) +int lttng_ustconsumer_take_snapshot(struct lttng_consumer_stream *stream) { return -ENOSYS; } static inline int lttng_ustconsumer_get_produced_snapshot( - struct lttng_consumer_local_data *ctx, - struct lttng_consumer_stream *stream, - unsigned long *pos) + struct lttng_consumer_stream *stream, unsigned long *pos) { return -ENOSYS; } @@ -146,11 +139,29 @@ void lttng_ustconsumer_on_stream_hangup(struct lttng_consumer_stream *stream) } static inline -int lttng_ustctl_get_mmap_read_offset(struct lttng_ust_shm_handle *handle, - struct lttng_ust_lib_ring_buffer *buf, unsigned long *off) +int lttng_ustctl_get_mmap_read_offset(struct lttng_consumer_stream *stream, + unsigned long *off) +{ + return -ENOSYS; +} +static inline +int lttng_ustconsumer_data_pending(struct lttng_consumer_stream *stream) { return -ENOSYS; } +static inline +void *lttng_ustctl_get_mmap_base(struct lttng_consumer_stream *stream) +{ + return NULL; +} +static inline +void lttng_ustconsumer_close_metadata(struct lttng_ht *ht) +{ +} +static inline +void lttng_ustconsumer_close_stream_wakeup(struct lttng_consumer_stream *stream) +{ +} #endif /* HAVE_LIBLTTNG_UST_CTL */ #endif /* _LTTNG_USTCONSUMER_H */