On Sun, 25 Feb 2007, Hareesh Nagarajan wrote: > On 2/19/07, Srdjan Todorovic <todorovic.s@xxxxxxxxxxxxxx> wrote: > > Hello everyone. > > > > I'm converting some scsi driver to use the kernel list API, and have a > > question regarding the list handling. > > I wrote a little article on linked list in the Linux kernel. You could > check it out: > http://www.cs.uic.edu/~hnagaraj/articles/linked-list/ > > Hareesh I had a look and bookmarked it. I had suspected that linux/list.h could be used in userpsace applications, but this is the first time I have seen it. I'm curious why you added the redo label and jumped to it with goto in delete_all(). AFAICS, __list_for_each() would iterate through the list and you remove each list_head from the list inside that loop. Once you visit all list_heads in the list, the list should just have the list_head that you created in main() with LIST_HEAD(fooHead). Maybe I'm mistaken, but was your intention to re-init the list head? Thanks for the link. Srdjan -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ