Main Page | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

queue.h File Reference

Go to the source code of this file.

Defines

#define _SPANDSP_QUEUE_H_
#define QUEUE_READ_ATOMIC   0x0001
#define QUEUE_WRITE_ATOMIC   0x0002
#define QUEUE_STATE_T_SIZE(len)   (sizeof(queue_state_t) + len + 1)

Typedefs

typedef queue_state_s queue_state_t

Functions

 SPAN_DECLARE (int) queue_empty(queue_state_t *s)
 Check if a queue is empty.
 SPAN_DECLARE (void) queue_flush(queue_state_t *s)
 Flush the contents of a queue.
 SPAN_DECLARE (queue_state_t *) queue_init(queue_state_t *s
 Initialise a queue.

Variables

uint8_t * buf
uint8_t int len
uint8_t byte
int int flags


Detailed Description


Define Documentation

#define QUEUE_READ_ATOMIC   0x0001
 

Flag bit to indicate queue reads are atomic operations. This must be set if the queue is to be used with the message oriented functions.

#define QUEUE_WRITE_ATOMIC   0x0002
 

Flag bit to indicate queue writes are atomic operations. This must be set if the queue is to be used with the message oriented functions.


Typedef Documentation

typedef struct queue_state_s queue_state_t
 

Queue descriptor. This defines the working state for a single instance of a byte stream or message oriented queue.


Function Documentation

SPAN_DECLARE queue_state_t  ) 
 

Initialise a queue.

Initialise a queue.

Parameters:
s The queue context. If is imperative that the context this points to is immediately followed by a buffer of the required size + 1 octet.
len The length of the queue's buffer.
flags Flags controlling the operation of the queue. Valid flags are QUEUE_READ_ATOMIC and QUEUE_WRITE_ATOMIC.
Returns:
A pointer to the context if OK, else NULL.

SPAN_DECLARE void   ) 
 

Flush the contents of a queue.

Log the list of supported modulations.

Parameters:
s The V.8 context.
modulation_schemes The list of supported modulations.

SPAN_DECLARE int32_t   ) 
 

Check if a queue is empty.

Compress a block of octets.

Parameters:
s The V.42bis context.
buf The data to be compressed.
len The length of the data buffer.
Returns:
0


Generated on Fri Aug 28 20:12:28 2009 for spandsp by  doxygen 1.3.9.1