On Sun, 21 Nov 2010, Bruce Blinn wrote: > New task structures are added into the list in kernel/fork.c (line > 1743 in my source). that's not what i see here, can you reproduce the few lines at that point? i had assumed it was in fork.c somewhere. > But, my question is, how common is it for there to be a list without > an external list_head structure. This is one example. > It looks like some of the macros in list.h also assume there is an > external list_head structure. For example, the list passed to > list_splice() assumes it points to the list but is not part of the > list. If the list parameter is an entry in the list, it will be > lost. i think the right way to look at this is that the kernel linked list implementation is if you need a linked list for code that you're writing, say for a new driver. don't design your own linked list, use the one that's provided. having said that, there's nothing that requires core code to use it, especially if that core code has a slightly different model, like the task list which *starts off* with an initial entry (init_task). there may indeed be other places in the kernel source where you have lists that don't have a special case head_list and don't take full advantage of the LL implementation. but if those are special cases, no one says they have to. that's the best explanation i can come up with. rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ