kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* About head of kernel linked list structure
@ 2015-05-06 10:39 Huaicheng Li
  2015-05-06 19:45 ` Robert P. J. Day
  2015-05-07 10:52 ` Mulyadi Santosa
  0 siblings, 2 replies; 9+ messages in thread
From: Huaicheng Li @ 2015-05-06 10:39 UTC (permalink / raw)
  To: kernelnewbies

In my understanding, the head initialised using LIST_HEAD_INIT or defined by LIST_HEAD corresponds to no *real* data field. 
But it *does* have its own _next_ and _prev_ pointers. The _next_ pointer points to the first real node in the doubly linked list,
and the _prev_ pointer points to the last real node. 

I'm wondering if the picture shown at the very bottom of http://kernelnewbies.org/FAQ/LinkedLists is wrong about this. Because
I believe head's _prev_ should point to the last node, which is at the very right. And the last node's _next_ should point to the head.
Just as shown like the red line.

Am I right?



--
Best Regards
Huaicheng Li






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150506/5cd631c4/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linked_list_example copy.png
Type: image/png
Size: 37281 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150506/5cd631c4/attachment-0001.png 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-05-11  4:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-06 10:39 About head of kernel linked list structure Huaicheng Li
2015-05-06 19:45 ` Robert P. J. Day
2015-05-07 10:52   ` Huaicheng Li
2015-05-07 11:05     ` Robert P. J. Day
2015-05-07 10:52 ` Mulyadi Santosa
2015-05-07 10:57   ` Mulyadi Santosa
2015-05-08  1:02     ` Bernd Petrovitsch
2015-05-08 23:05   ` Jeff Haran
2015-05-11  4:45     ` Mulyadi Santosa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).