\doxysection{It\+\_\+q}
\label{group__it__q}\index{It\_q@{It\_q}}


Inter-\/\+Thread Message Queue.  


Inter-\/\+Thread Message Queue. 

This implements a general-\/purpose queue between threads. It uses user-\/provided data types (containing a \doxyref{llist\+\_\+head}{p.}{structllist__head} as initial member) as elements in the queue and an eventfd-\/based notification mechanism. Hence, it can be used for pretty much anything, including but not limited to msgbs, including msgb-\/wrapped osmo\+\_\+prim.

The idea is that the sending thread simply calls \doxyref{osmo\+\_\+it\+\_\+q\+\_\+enqueue()}{p.}{group__osmo__it__q_gab56762c36042bee31d8c139ec5786012}. The receiving thread is woken up from its \doxyref{osmo\+\_\+select\+\_\+main()}{p.}{group__select_gabc1e2b227ca4c88df091ad2ba22c4231} loop by eventfd, and a general \doxyref{osmo\+\_\+fd}{p.}{structosmo__fd} callback function for the eventfd will dequeue each item and call a queue-\/specific callback function. 