tags:

views:

214

answers:

3

Where can I find the infamous list.h from the linux kernel?

I remember seeing it at once point and I can't for the life of me find it again. I'm running a Windows box so it would be great if you can point me out to a nice HTTP site where it's hosted :)

Thanks.

+1  A: 

If all you need is a peek at the code, the Linux Cross Reference will show you anything you like. I don't see a list.c in there anywhere, though.

Eric Seppanen
It's the kernel's linked list implementation.
Clark Gaebel
The linked list helpers are macros, and contained in list.h
Tim Post
+2  A: 

See here for details about the Linux list.h.

Robert Gamble
+1  A: 

Rusty Russel (who worked on the kernel implementation of doubly linked list helpers) later ported the work to a more generic set of macros which can be found on his ccan project. Its also LGPL2 or later, so you can use it in whatever you want. Note the dependency on ccan's containerof.

It might be better for you to use the one in the link, as its maintained separately from its kernel counterpart.

As for CCAN, think CPAN, but for C.

Tim Post