aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndi Kleen <[email protected]>2010-01-15 17:01:16 -0800
committerLinus Torvalds <[email protected]>2010-01-16 12:15:38 -0800
commita5b9e2c1063046421ce01dcf5ddd7ec12567f3e1 (patch)
tree09cef2a043af96491497db380abe89af2aee5176 /include/linux
parent64ce1037c5434b1d036cd99ecaee6e00496bc2e9 (diff)
kfifo: add kfifo_out_peek
In some upcoming code it's useful to peek into a FIFO without permanentely removing data. This patch implements a new kfifo_out_peek() to do this. Signed-off-by: Andi Kleen <[email protected]> Acked-by: Stefani Seibold <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Andy Walls <[email protected]> Cc: Vikram Dhillon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kfifo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index 86ad50a900c8..7ad6d32dd673 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -113,6 +113,9 @@ extern unsigned int kfifo_in(struct kfifo *fifo,
const void *from, unsigned int len);
extern __must_check unsigned int kfifo_out(struct kfifo *fifo,
void *to, unsigned int len);
+extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo,
+ void *to, unsigned int len, unsigned offset);
+
/**
* kfifo_reset - removes the entire FIFO contents