Hacker News new | ask | show | jobs
by nirs 1315 days ago
Typically you keep a list entry in the struct: https://man7.org/linux/man-pages/man3/stailq.3.html#EXAMPLES

The same list entry can be moved between several lists using the same type.

If the struct need to be in multiple lists in the same time you can keep multiple list entries in the same struct: https://github.com/freebsd/freebsd-src/blob/69413598d2660054...