Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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;
}
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;
}
#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 */