Fix: add "flush empty" ioctl for stream intersection
[lttng-modules.git] / lib / ringbuffer / ring_buffer_frontend.c
index 8b15ec7a2417f0062d98b9b3676799dd76152e58..dc1ee450a4eb8dad6bf8f9ecff4332c65ae460d6 100644 (file)
@@ -1830,12 +1830,20 @@ static void _lib_ring_buffer_switch_remote(struct lib_ring_buffer *buf,
        put_online_cpus();
 }
 
+/* Switch sub-buffer if current sub-buffer is non-empty. */
 void lib_ring_buffer_switch_remote(struct lib_ring_buffer *buf)
 {
        _lib_ring_buffer_switch_remote(buf, SWITCH_ACTIVE);
 }
 EXPORT_SYMBOL_GPL(lib_ring_buffer_switch_remote);
 
+/* Switch sub-buffer even if current sub-buffer is empty. */
+void lib_ring_buffer_switch_remote_empty(struct lib_ring_buffer *buf)
+{
+       _lib_ring_buffer_switch_remote(buf, SWITCH_FLUSH);
+}
+EXPORT_SYMBOL_GPL(lib_ring_buffer_switch_remote_empty);
+
 /*
  * Returns :
  * 0 if ok
This page took 0.023241 seconds and 4 git commands to generate.