lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.98.0706101317090.14121@woody.linux-foundation.org>
Date:	Sun, 10 Jun 2007 13:19:36 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Rusty Russell <rusty@...tcorp.com.au>
cc:	lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFC] struct list_node



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'" where each node is 100% equivalent to any other node, 
> and there _is_ no head.

Btw, to extend a bit on this: there actually *is* a "list with a head" 
implementation in <linux/list.h>, called "hlist".

Now, the "h" actually historically stands for "hash", but if you prefer, 
you can think of it as standing for "head", and be happy.

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).

And yes, I'm sure we could change some "struct list" users to "struct 
hlist" if you wanted to.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ