4 ms·
As others have pointed out, this is also used in the Linux kernel. But unfortunately it shares the kernel error of using the same type for list head and member.
by RustyRussell 8y ago
As others have pointed out, this is also used in the Linux kernel. But unfortunately it shares the kernel error of using the same type for list head and member. That's not good separation, and on particular it means list_add() is ambiguous (the kernel one is member, head, which is backwards).
Hence I recommend kernel refugees start with CCAN's list: http://ccodearchive.net/info/list.html http://ccodearchive.net/info/list.html