Re: struct list_head

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

 



--- Sridhar N <srin@symonds.net> wrote:
> Hi,
> 	I need a to use a singly-linked list in my program, and since a 
> doubly-linked list is provided in linux/list.h, i thought of using
> it.  But i 
> don't know how to use it.  I have a structure of nodes that i want
> to link, 
> say
> 
> struct foo {
> 	int foo1;
> 	int foo2;
> 	char * foo3;
> 	struct list_head list;
> };
> 
> How do I add a new node or initialize it. Seeing list.h didn't help
> me :-(
> But why doesn't task_struct use it ?
> 

Try Rubini & Corbet online at
http://www.xml.com/ldd/chapter/book/ch10.html#t5

Hope this helps,

--Christine


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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