Per-stream ioctl to get the current timestamp
[lttng-modules.git] / lttng-abi.c
index c2560e0573c2a9a5827a8bfb10d18b7642c96f1a..224b35284d859ce1b181c8fbb75ed06596d44f9e 100644 (file)
@@ -1408,6 +1408,17 @@ static long lttng_stream_ring_buffer_ioctl(struct file *filp,
                        goto error;
                return put_u64(si, arg);
        }
+       case LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP:
+       {
+               uint64_t ts;
+
+               if (!lttng_chan->ops)
+                       goto error;
+               ret = lttng_chan->ops->current_timestamp(config, buf, &ts);
+               if (ret < 0)
+                       goto error;
+               return put_u64(ts, arg);
+       }
        default:
                return lib_ring_buffer_file_operations.unlocked_ioctl(filp,
                                cmd, arg);
@@ -1497,6 +1508,17 @@ static long lttng_stream_ring_buffer_compat_ioctl(struct file *filp,
                        goto error;
                return put_u64(si, arg);
        }
+       case LTTNG_RING_BUFFER_GET_CURRENT_TIMESTAMP:
+       {
+               uint64_t ts;
+
+               if (!lttng_chan->ops)
+                       goto error;
+               ret = lttng_chan->ops->current_timestamp(config, buf, &ts);
+               if (ret < 0)
+                       goto error;
+               return put_u64(ts, arg);
+       }
        default:
                return lib_ring_buffer_file_operations.compat_ioctl(filp,
                                cmd, arg);
This page took 0.02313 seconds and 4 git commands to generate.