Loading...
Searching...
No Matches
osmo_it_q Struct Reference
Inter-Thread Queue

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

Referenced by _osmo_it_q_dequeue(), _osmo_it_q_enqueue(), _osmo_it_q_flush(), and osmo_it_q_alloc().

## data

void* osmo_it_q::data

Referenced by osmo_it_q_alloc().

## entry

struct llist_head osmo_it_q::entry

Referenced by _osmo_it_q_by_name(), osmo_it_q_alloc(), and osmo_it_q_destroy().

## event_ofd

struct osmo_fd osmo_it_q::event_ofd

Referenced by _osmo_it_q_enqueue(), osmo_it_q_alloc(), and osmo_it_q_destroy().

## list

struct llist_head osmo_it_q::list

Referenced by _osmo_it_q_dequeue(), _osmo_it_q_enqueue(), _osmo_it_q_flush(), and osmo_it_q_alloc().

## max_length

unsigned int osmo_it_q::max_length

Referenced by _osmo_it_q_enqueue(), and osmo_it_q_alloc().

## mutex

pthread_mutex_t osmo_it_q::mutex

Referenced by _osmo_it_q_dequeue(), _osmo_it_q_enqueue(), osmo_it_q_alloc(), osmo_it_q_destroy(), and osmo_it_q_flush().

## name

const char* osmo_it_q::name

Referenced by _osmo_it_q_by_name(), and osmo_it_q_alloc().

## read_cb

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

Referenced by osmo_it_q_alloc(), and osmo_it_q_fd_cb().

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

- include/osmocom/core/it_q.h