libosmocore 1.9.0.196-9975
Osmocom core library
osmo_it_q Struct Reference

One instance of an inter-thread queue. More...

#include <it_q.h>

Data Fields

struct llist_head entry
 
struct llist_head list
 
pthread_mutex_t mutex
 
unsigned int current_length
 
struct osmo_fd event_ofd
 
const char * name
 
unsigned int max_length
 
void(* read_cb )(struct osmo_it_q *q, struct llist_head *item)
 
void * data
 

Detailed Description

One instance of an inter-thread queue.

The user can use this to queue messages between different threads. The enqueue operation is non-blocking (but of course grabs a mutex for the actual list operations to safeguard against races). The receiving thread is woken up by an event_fd which can be registered in the libosmocore select loop handling.

Field Documentation

◆ current_length

unsigned int osmo_it_q::current_length

◆ data

void* osmo_it_q::data

◆ entry

struct llist_head osmo_it_q::entry

◆ event_ofd

struct osmo_fd osmo_it_q::event_ofd

◆ list

struct llist_head osmo_it_q::list

◆ max_length

unsigned int osmo_it_q::max_length

◆ mutex

pthread_mutex_t osmo_it_q::mutex

◆ name

const char* osmo_it_q::name

◆ read_cb

void(* osmo_it_q::read_cb) (struct osmo_it_q *q, struct llist_head *item)

The documentation for this struct was generated from the following file: