Message Queues (application internal)


Typedefs

typedef ix_msg_queue_s ix_msg_queue_t
 handler for message queues

Functions

ix_msg_queue_tix_msg_queue_new (ix_event_t *pev)
ix_msg_queue_tix_msg_queue_size_new (ix_event_t *pev, size_t size)
int ix_msg_queue_overrun (ix_msg_queue_t *pmq)
int ix_msg_queue_count (ix_msg_queue_t *pmq)
void ix_msg_queue_free (ix_msg_queue_t *pmq)
void * ix_msg_queue_eat (ix_msg_queue_t *pmq)
int ix_msg_queue_add (ix_msg_queue_t *pmq, void *pb, void **pret)

Detailed Description

A message queue is used to exchange data between threads. The pointer to data are stored in the queue. An event is triggered when something was put in the queue.

Function Documentation

int ix_msg_queue_add ( ix_msg_queue_t pmq,
void *  pb,
void **  pret 
)

adds data to queue

Parameters:
pmq handle of message queue
pb pointer to store
pret pointer to store the eventually overwritten entry
Returns:
  • 0: OK
  • <0: Error

int ix_msg_queue_count ( ix_msg_queue_t pmq  ) 

message queue count

Parameters:
pmq handle of message queue
Returns:
  • number of entries in queue
  • -1: error

void* ix_msg_queue_eat ( ix_msg_queue_t pmq  ) 

eats head of message-queue

Parameters:
pmq handle of message queue
Returns:
  • pointer to data
  • NULL: error or queue empty

void ix_msg_queue_free ( ix_msg_queue_t pmq  ) 

free message queue

Parameters:
pmq handle of message queue

ix_msg_queue_t* ix_msg_queue_new ( ix_event_t pev  ) 

creates new message queue with default size

Parameters:
pev event to trigger when something was put to queue
Returns:
  • handle
  • NULL: Error

int ix_msg_queue_overrun ( ix_msg_queue_t pmq  ) 

message queue overruns

Parameters:
pmq handle of message queue
Returns:
  • number of occured overruns in queue
  • -1: error

ix_msg_queue_t* ix_msg_queue_size_new ( ix_event_t pev,
size_t  size 
)

creates new message queue user defined size

Parameters:
pev event to trigger when something was put to queue
size message queue for max size entries
Returns:
  • handle
  • NULL: Error


Generated on 4 Mar 2014 for ixtools by  doxygen 1.4.7