<div dir="ltr">Hello,<div><br></div><div>our team got a comment about ugly thread queue implementation, which was</div><div>implemented using a generic list_t macro that takes: type of list item, the link member and name</div><div>of the new specialised struct, and expands to a new specialised struct containing list_t</div><div>and all the methods used to work with the new struct.</div><div><br></div><div>I understand that this is not the most beautiful thing under the sun :-)</div><div><br></div><div>But anyhow, I couldn't figure out how to make the thread queue a first-class citizen</div><div>while at the same time make it reusable by both the scheduler and the mutex, since</div><div>they each use different link_t in the thread_t structure.</div><div><br></div><div>Can you maybe suggest how one would go about achieving the most beautiful thread</div><div>queue implementation there is?</div><div><br></div><div>Thank you :-)</div><div><br></div><div>Kind regards</div><div>Jan Kytka</div></div>