提交 5ddf8391 编写于 作者: A Andrea Righi 提交者: Linus Torvalds

kfifo: add kfifo_skip() testcase

Add a testcase for kfifo_skip() to the byte stream fifo example.
Signed-off-by: NAndrea Righi <arighi@develer.com>
Cc: Greg KH <greg@kroah.com>
Acked-by: NStefani Seibold <stefani@seibold.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 b35de43b
......@@ -73,6 +73,10 @@ static int __init testfunc(void)
ret = kfifo_in(&test, buf, ret);
printk(KERN_INFO "ret: %d\n", ret);
/* skip first element of the fifo */
printk(KERN_INFO "skip 1st element\n");
kfifo_skip(&test);
/* put values into the fifo until is full */
for (i = 20; kfifo_put(&test, &i); i++)
;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册