aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/ring_buffer.h
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-02-28 19:59:17 -0500
committerSteven Rostedt <rostedt@goodmis.org>2013-03-15 00:34:50 -0400
commit15693458c4bc0693fd63a50d60f35b628fcf4e29 (patch)
tree9ce7c378ec85134b84852b474e301e135187c0c0 /include/linux/ring_buffer.h
parenttracing: Fix read blocking on trace_pipe_raw (diff)
downloadwireguard-linux-15693458c4bc0693fd63a50d60f35b628fcf4e29.tar.xz
wireguard-linux-15693458c4bc0693fd63a50d60f35b628fcf4e29.zip
tracing/ring-buffer: Move poll wake ups into ring buffer code
Move the logic to wake up on ring buffer data into the ring buffer code itself. This simplifies the tracing code a lot and also has the added benefit that waiters on one of the instance buffers can be woken only when data is added to that instance instead of data added to any instance. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ring_buffer.h')
-rw-r--r--include/linux/ring_buffer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h
index 1342e69542f3..d69cf637a15a 100644
--- a/include/linux/ring_buffer.h
+++ b/include/linux/ring_buffer.h
@@ -4,6 +4,7 @@
#include <linux/kmemcheck.h>
#include <linux/mm.h>
#include <linux/seq_file.h>
+#include <linux/poll.h>
struct ring_buffer;
struct ring_buffer_iter;
@@ -96,6 +97,11 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k
__ring_buffer_alloc((size), (flags), &__key); \
})
+void ring_buffer_wait(struct ring_buffer *buffer, int cpu);
+int ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu,
+ struct file *filp, poll_table *poll_table);
+
+
#define RING_BUFFER_ALL_CPUS -1
void ring_buffer_free(struct ring_buffer *buffer);