kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* kernel list data structure
@ 2011-06-05 13:39 Amirali Shambayati
  2011-06-06  1:47 ` Jonathan Neuschäfer
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Amirali Shambayati @ 2011-06-05 13:39 UTC (permalink / raw)
  To: kernelnewbies

Hello all,
I wanted to use list data structure implemented inside kernel. It seems that
it is too different with usual concept from a list data structure. I studied
about it, and I thought that I got familiar enough to use it. I have
implemented a two-dimensioned list, using what I understood about kernel
list.  But as I debugged my code, it seems that my concept is wrong. Would
anyone guide me how to implement a two-dimensioned list, or introduce me a
manual to learn about it more?

I have two data structures called "noop_data" and "bundle". I have a list of
bundles, which each one has a list of requests.
I implemented it, this way:
"noop_data" has a reference to start point of bundles list, called
"writeQueue"
"bundle" has a reference to start point of requests list, called
"reqsQueue".
"bundle" knows its related list using "bundlesQueue".
"request" knows its related list using "queuelist". (request struct is
already implemented in kernel)

struct bundle {
    int bundleNumber;
    int size;
    struct list_head bundlesQueue;
    struct list_head reqsQueue;
    int filled[8];
};

struct noop_data {
    struct list_head readQueue;
    struct list_head writeQueue;
    struct bundle bun;
    unsigned int starved;
};


-- 
Amirali Shambayati
Bachelor Student
Computer Engineering Department
Sharif University of Technology
Tehran, Iran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110605/e4eb9106/attachment.html 

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

end of thread, other threads:[~2011-06-13 10:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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