libosmocore 1.10.0.63-d25f
Osmocom core library
|
Inter-Thread Message Queue.
Inter-Thread Message Queue.
This implements a general-purpose queue between threads. It uses user-provided data types (containing a llist_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 osmo_it_q_enqueue(). The receiving thread is woken up from its osmo_select_main() loop by eventfd, and a general osmo_fd callback function for the eventfd will dequeue each item and call a queue-specific callback function.