Merge LTTng commit 5c0552665e4d152e97edc995650711d4f6ac418d
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Jun 2011 16:06:28 +0000 (12:06 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 27 Jun 2011 16:06:28 +0000 (12:06 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/ring_buffer_vfs.c
libringbuffer/vfs.h

index 3aa3acaac1f6beebb14f984c4d7d4eea152a0458..c105fe000763eedb0922c353860744e33af39a2f 100644 (file)
@@ -240,6 +240,9 @@ long lib_ring_buffer_ioctl(struct file *filp, unsigned int cmd, unsigned long ar
                return put_ulong(buf->backend.array[sb_bindex]->mmap_offset,
                                 arg);
        }
+       case RING_BUFFER_FLUSH:
+               lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE);
+               return 0;
        default:
                return -ENOIOCTLCMD;
        }
@@ -350,6 +353,9 @@ long lib_ring_buffer_compat_ioctl(struct file *filp, unsigned int cmd,
                        return -EINVAL;
                return put_ulong(read_offset, arg);
        }
+       case RING_BUFFER_FLUSH:
+               lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE);
+               return 0;
        default:
                return -ENOIOCTLCMD;
        }
index a27f8c50f08a5228d0fdcdaab1448033be77c321..00404a31751dd0d34d3c432d655eb0beed55db93 100644 (file)
@@ -80,5 +80,7 @@ long lib_ring_buffer_compat_ioctl(struct file *filp, unsigned int cmd,
 #define RING_BUFFER_GET_MMAP_LEN               _IOR(0xF6, 0x0A, unsigned long)
 /* returns the offset of the subbuffer belonging to the mmap reader. */
 #define RING_BUFFER_GET_MMAP_READ_OFFSET       _IOR(0xF6, 0x0B, unsigned long)
+/* flush the current sub-buffer */
+#define RING_BUFFER_FLUSH                      _IO(0xF6, 0x0C)
 
 #endif /* _LINUX_RING_BUFFER_VFS_H */
This page took 0.026293 seconds and 4 git commands to generate.