Per-stream ioctl to get the current timestamp
[lttng-ust.git] / liblttng-ust / lttng-ring-buffer-client.h
index 46717135cd4cdf9536f3ff74a4cd4252a8c7e849..2cdecbe9f6bfdd8cf670304b20b29cc06cdaa4f1 100644 (file)
@@ -470,6 +470,18 @@ static int client_stream_id(struct lttng_ust_lib_ring_buffer *buf,
        return 0;
 }
 
+static int client_current_timestamp(struct lttng_ust_lib_ring_buffer *buf,
+               struct lttng_ust_shm_handle *handle,
+               uint64_t *ts)
+{
+       struct channel *chan;
+
+       chan = shmp(handle, handle->chan);
+       *ts = client_ring_buffer_clock_read(chan);
+
+       return 0;
+}
+
 static const
 struct lttng_ust_client_lib_ring_buffer_client_cb client_cb = {
        .parent = {
@@ -487,6 +499,7 @@ struct lttng_ust_client_lib_ring_buffer_client_cb client_cb = {
        .content_size = client_content_size,
        .packet_size = client_packet_size,
        .stream_id = client_stream_id,
+       .current_timestamp = client_current_timestamp,
 };
 
 static const struct lttng_ust_lib_ring_buffer_config client_config = {
This page took 0.023266 seconds and 4 git commands to generate.