lkml.org 
[lkml]   [2004]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC, 2.6] a simple FIFO implementation
On Thu, Sep 16, 2004 at 10:00:50AM -0700, Andrew Morton wrote:

> Stelian Pop <stelian@popies.net> wrote:
> >
> > Here is the updated patch.
>
> Looks good to me.
>
> You're using `head' as "the place from which `get' gets characters" and
> you're using `tail' as "the place where `put' puts characters". So the
> FIFO is, logically:
>
>
> tail head
> * -> ******************** -> *
> put get
>

That was the intent, yes.

> I've always done it the other way: you put stuff onto the head and take
> stuff off the tail. Now I have a horid feeling that I've always been
> arse-about. hrm.

Maybe I should use 'start' and 'end' as indices after all, they
are less subject to confusion.

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

\
 
 \ /
  Last update: 2005-03-22 14:06    [from the cache]
©2003-2011 Jasper Spaans