diff options
Diffstat (limited to 'include/linux/ring_buffer.h')
-rw-r--r-- | include/linux/ring_buffer.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index e061b4ecdc3a..5fcc31ed5771 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
@@ -140,8 +140,17 @@ unsigned long ring_buffer_size(struct ring_buffer *buffer); | |||
140 | void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu); | 140 | void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu); |
141 | void ring_buffer_reset(struct ring_buffer *buffer); | 141 | void ring_buffer_reset(struct ring_buffer *buffer); |
142 | 142 | ||
143 | #ifdef CONFIG_RING_BUFFER_ALLOW_SWAP | ||
143 | int ring_buffer_swap_cpu(struct ring_buffer *buffer_a, | 144 | int ring_buffer_swap_cpu(struct ring_buffer *buffer_a, |
144 | struct ring_buffer *buffer_b, int cpu); | 145 | struct ring_buffer *buffer_b, int cpu); |
146 | #else | ||
147 | static inline int | ||
148 | ring_buffer_swap_cpu(struct ring_buffer *buffer_a, | ||
149 | struct ring_buffer *buffer_b, int cpu) | ||
150 | { | ||
151 | return -ENODEV; | ||
152 | } | ||
153 | #endif | ||
145 | 154 | ||
146 | int ring_buffer_empty(struct ring_buffer *buffer); | 155 | int ring_buffer_empty(struct ring_buffer *buffer); |
147 | int ring_buffer_empty_cpu(struct ring_buffer *buffer, int cpu); | 156 | int ring_buffer_empty_cpu(struct ring_buffer *buffer, int cpu); |