Re: [RFC, 2.6] a simple FIFO implementation

From: Hugh Dickins
Date: Fri Sep 17 2004 - 06:47:16 EST


On Fri, 17 Sep 2004, Stelian Pop wrote:
> - if the fifo becomes empty after a get() sets in = out = 0
> so only a memcpy() will be needed not two in the next put/get.

Within the lockless __kfifo_get? Doesn't that violate an essential
property of such a circular buffer, that the producer manipulates
only the "in" index and the consumer only the "out" index?
Within the locking version's kfifo_get wrapper, perhaps.

Hugh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/