X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=lib%2Fringbuffer%2Fring_buffer_vfs.c;h=60d69a929b816a8c0db1a0216688b6e73fb527d2;hb=6b40862968f9211983918d0e99cbe3656a0dd600;hp=fecef217c8bfdd9a51587f930a5dc7c2dcecac64;hpb=254ec7bc4c72da11a4e3f2c90904b111a06a2c55;p=lttng-modules.git diff --git a/lib/ringbuffer/ring_buffer_vfs.c b/lib/ringbuffer/ring_buffer_vfs.c index fecef217..60d69a92 100644 --- a/lib/ringbuffer/ring_buffer_vfs.c +++ b/lib/ringbuffer/ring_buffer_vfs.c @@ -89,7 +89,7 @@ unsigned int lib_ring_buffer_poll(struct file *filp, poll_table *wait) int finalized, disabled; if (filp->f_mode & FMODE_READ) { - init_poll_funcptr(wait, wrapper_pollwait_exclusive); + poll_wait_set_exclusive(wait); poll_wait(filp, &buf->read_wait, wait); finalized = lib_ring_buffer_is_finalized(config, buf); @@ -245,6 +245,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; } @@ -355,6 +358,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; }