]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - samples/kfifo/bytestream-example.c
kfifo: add kfifo_skip() testcase
[net-next-2.6.git] / samples / kfifo / bytestream-example.c
index 642eef3f633624413dccda3ab85b1eb6e2bcc578..2e3a7a8128a26667b8cb65728bf8554b18726a85 100644 (file)
@@ -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++)
                ;