On Sun, 10 Jun 2007 15:11:30 +1000, Rusty Russell wrote:
>
> +/* A list node is the same as the head of the list, but it's useful to
> + * think of them as a separate type. */
> +struct list_node {
> + struct list_head h;
> +};
> +
> +/* This allows us to support old style list_head as well
On Sun, 2007-06-10 at 13:19 -0700, Linus Torvalds wrote:
> And if you want a head, you really do want to use "hlist", since the head
> is smaller than a list entry (a single pointer rather than two).
No, now you're entirely missing the point.
The normal Linux lists are beautiful, and should be u
On Sun, 2007-06-10 at 10:20 -0700, Linus Torvalds wrote:
>
> On Sun, 10 Jun 2007, Rusty Russell wrote:
> >
> > The current list.h has the same type for list elements and list heads
> > even though most code and coders treat them as distinct.
>
> I think the old list.h is technically superior to y
On Sun, 10 Jun 2007, Linus Torvalds wrote:
>
> The Linux kernel list.h is _better_ than most stupid list implementations
> that think that a head node is different from the list node. Exactly
> because it very naturally supports the notion of "this structure exists in
> a 'ring of entries'" w
On Sun, 10 Jun 2007, Rusty Russell wrote:
>
> The current list.h has the same type for list elements and list heads
> even though most code and coders treat them as distinct.
I think the old list.h is technically superior to yours.
Exactly *because* nodes and heads are interchangeable.
In fact
On Sun, 10 Jun 2007 15:11:30 +1000 Rusty Russell wrote:
> The current list.h has the same type for list elements and list heads
> even though most code and coders treat them as distinct.
>
> I've had a version of list.h (for userspace work) for about a year
> which uses a different type for nodes
The current list.h has the same type for list elements and list heads
even though most code and coders treat them as distinct.
I've had a version of list.h (for userspace work) for about a year
which uses a different type for nodes and it works very well: code is
clearer, and mistakes like list_ad
7 matches
Mail list logo