From: bernd@petrovitsch.priv.at (Bernd Petrovitsch)
To: kernelnewbies@lists.kernelnewbies.org
Subject: About head of kernel linked list structure
Date: Fri, 08 May 2015 03:02:08 +0200 [thread overview]
Message-ID: <1431046930.20751.110.camel@thorin> (raw)
In-Reply-To: <CAGdaadbMEqOEfwKQ6hG5UmKzvL=VcU3MTf2Q-cK+Mz63_zoTWQ@mail.gmail.com>
Hi all!
On Don, 2015-05-07 at 17:57 +0700, Mulyadi Santosa wrote:
> On Wed, May 6, 2015 at 5:39 PM, Huaicheng Li <lhcwhu@gmail.com> wrote:
> > 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.
[...]
> AFAIK, if the linked list is not circular one, the last node's next should
> point to NULL, so does the head prev's. This is done so you know when you
> hit head i.e
>
> if !(head.prev)
What programming language?
Bernd
--
"I dislike type abstraction if it has no real reason. And saving
on typing is not a good reason - if your typing speed is the main
issue when you're coding, you're doing something seriously wrong."
- Linus Torvalds
next prev parent reply other threads:[~2015-05-08 1:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2015-05-08 23:05 ` Jeff Haran
2015-05-11 4:45 ` Mulyadi Santosa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431046930.20751.110.camel@thorin \
--to=bernd@petrovitsch.priv.at \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).