Cleanup: apply `include-what-you-use` guideline for `uint*_t`
[lttng-ust.git] / include / lttng / ust-ctl.h
index f83124d11bbd9276100642dff9a4041a0ac892bc..4b254efac37d458025379116c73151070ec77458 100644 (file)
 #ifndef _LTTNG_UST_CTL_H
 #define _LTTNG_UST_CTL_H
 
-#include <lttng/ust-abi.h>
-#include <sys/types.h>
 #include <limits.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <lttng/ust-abi.h>
+
+#ifndef LTTNG_PACKED
+#error "LTTNG_PACKED should be defined"
+#endif
 
 #ifndef LTTNG_UST_UUID_LEN
 #define LTTNG_UST_UUID_LEN     16
@@ -238,8 +245,15 @@ int ustctl_put_subbuf(struct ustctl_consumer_stream *stream);
 
 void ustctl_flush_buffer(struct ustctl_consumer_stream *stream,
                int producer_active);
+void ustctl_clear_buffer(struct ustctl_consumer_stream *stream);
 
 /* index */
+
+/*
+ * Getters which need to be used on the current packet (between get/put
+ * or get_next/put_next.
+ */
+
 int ustctl_get_timestamp_begin(struct ustctl_consumer_stream *stream,
                uint64_t *timestamp_begin);
 int ustctl_get_timestamp_end(struct ustctl_consumer_stream *stream,
@@ -250,15 +264,26 @@ int ustctl_get_content_size(struct ustctl_consumer_stream *stream,
        uint64_t *content_size);
 int ustctl_get_packet_size(struct ustctl_consumer_stream *stream,
        uint64_t *packet_size);
-int ustctl_get_stream_id(struct ustctl_consumer_stream *stream,
-               uint64_t *stream_id);
-int ustctl_get_current_timestamp(struct ustctl_consumer_stream *stream,
-               uint64_t *ts);
 int ustctl_get_sequence_number(struct ustctl_consumer_stream *stream,
                uint64_t *seq);
+
+/*
+ * Getter returning state invariant for the stream, which can be used
+ * without "get" operation.
+ */
+
+int ustctl_get_stream_id(struct ustctl_consumer_stream *stream,
+               uint64_t *stream_id);
 int ustctl_get_instance_id(struct ustctl_consumer_stream *stream,
                uint64_t *id);
 
+/*
+ * Getter returning the current timestamp as perceived from the
+ * tracer.
+ */
+int ustctl_get_current_timestamp(struct ustctl_consumer_stream *stream,
+               uint64_t *ts);
+
 /* returns whether UST has perf counters support. */
 int ustctl_has_perf_counters(void);
 
This page took 0.025211 seconds and 4 git commands to generate.