[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
struct list_head
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 ?
regards
Sridhar
--
Anyone can do any amount of work provided it isn't the work he is supposed to
be doing
-- Murphy's Laws on Work
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/