Re: kernel list data structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Amirali,

> 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'm definitely on the newb end of things as far as kernel data
structures go. So getting another opinion would be prudent.

As for a manual, Wolfgang Mauerer's book, Professional Linux Kernel
Architecture, is an excellent resource. It does touch on double
linked-lists (LL), though I've only glanced at it.

 

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

I don't think so. See below.


> struct bundle {

>     struct list_head bundlesQueue;
>     struct list_head reqsQueue;

What I see here is that you are putting such nodes on 2 LLs.

 
> struct noop_data {
>     struct list_head readQueue;
>     struct list_head writeQueue;

What I see here is that you are putting such nodes on 2 LLs, but

>     struct bundle bun;

each node has a single node of the type 'struct bundle' ie a struct
which has
    int bundleNumber;
    int size;
    ...
    int filled[8];

Likely, this is not what you want.

later,
ali

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux