Toward a better list iterator for the Linux kernel
This is really part of the intro, but I wonder if someone knows anyway:<p>My very naive first guess at making a generic linked list would be, of course, a struct with a 'next,' 'prev,' and the void pointer to the payload (What can I say? At some point my brain was damaged by OO languages). I guess their method of instead defining a struct, embedding the linked list into it, and then using macros would probably interact more nicely with the type system.<p>Are there other benefits, though? I vaguely suspect their system might tend to prod users toward laying out their memory more nicely.