<div dir="ltr">Hello all,<br>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?<br>
<br>I have two data structures called "noop_data" and "bundle". I have a list of bundles, which each one has a list of requests.<br>I implemented it, this way:<br>"noop_data" has a reference to start point of bundles list, called "writeQueue"<br>
"bundle" has a reference to start point of requests list, called "reqsQueue".<br>"bundle" knows its related list using "bundlesQueue".<br>"request" knows its related list using "queuelist". (request struct is already implemented in kernel)<br>
<br>struct bundle {<br> int bundleNumber;<br> int size;<br> struct list_head bundlesQueue;<br> struct list_head reqsQueue;<br> int filled[8];<br>};<br><br>struct noop_data {<br> struct list_head readQueue;<br>
struct list_head writeQueue;<br> struct bundle bun;<br> unsigned int starved;<br>};<br><br clear="all"><br>-- <br><div dir="ltr"><font style="font-family: arial,helvetica,sans-serif;" size="2">Amirali Shambayati<br>
Bachelor Student<br>Computer Engineering Department<br>Sharif University of Technology<br>Tehran, Iran</font><br style="font-family: arial,helvetica,sans-serif;"><input type="hidden"><input type="hidden"><div style="font-family: arial,helvetica,sans-serif;">
</div></div><br>
</div>