kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: ali@internetdog.org (Ali Bahar)
To: kernelnewbies@lists.kernelnewbies.org
Subject: kernel list data structure
Date: Mon, 6 Jun 2011 10:19:57 +0800	[thread overview]
Message-ID: <20110606021957.GB15480@internetdog.org> (raw)
In-Reply-To: <20110606014734.GE15862@debian.debian>

> > "noop_data" has a reference to start point of bundles list, called
> > "writeQueue"

> > struct noop_data {
> >     struct list_head readQueue;
> >     struct list_head writeQueue;
> >     struct bundle bun;
> 
> Why are you embedding a struct bundle here?

This was my focus, too. In my previous mail, I said that this is
wrong.
But I think that there is another problem here as well: Amirali wants
writeQueue to be the "start point of bundles list", but it won't.
writeQueue is just a linked list (LL) of nodes of type 'struct
noop_data'. (I am hoping that you, Jonathan, have more experience with
this than me. What do you think?)

Looking at the definition of list_head, it is just a pair of next-prev
pointers. As such, 'head' is a misnomer. (I don't usually barge-in,
criticizing, so don't bite my head off, please!)

I need to dig a bit more into this.
later,
ali

  reply	other threads:[~2011-06-06  2:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-05 13:39 kernel list data structure Amirali Shambayati
2011-06-06  1:47 ` Jonathan Neuschäfer
2011-06-06  2:19   ` Ali Bahar [this message]
2011-06-06  4:00     ` Ali Bahar
2011-06-06  1:59 ` Ali Bahar
2011-06-06  5:35 ` Ali Bahar
2011-06-06  6:13   ` Amirali Shambayati
     [not found]     ` <BANLkTin1yNceh7d6d8AdTqDCiSmFxp976A@mail.gmail.com>
2011-06-06  6:31       ` Amirali Shambayati
2011-06-06  8:16         ` Amirali Shambayati
2011-06-06 14:31         ` Jonathan Neuschäfer
2011-06-07  1:51     ` Ali Bahar
2011-06-12 15:42       ` Amirali Shambayati
2011-06-13 10:57         ` Amirali Shambayati

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=20110606021957.GB15480@internetdog.org \
    --to=ali@internetdog.org \
    --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).