Typedefs | |
| typedef apr_queue_t | switch_queue_t |
Functions | |
| switch_status_t | switch_queue_create (switch_queue_t **queue, unsigned int queue_capacity, switch_memory_pool_t *pool) |
| switch_status_t | switch_queue_pop (switch_queue_t *queue, void **data) |
| switch_status_t | switch_queue_push (switch_queue_t *queue, void *data) |
| unsigned int | switch_queue_size (switch_queue_t *queue) |
| switch_status_t | switch_queue_trypop (switch_queue_t *queue, void **data) |
| switch_status_t | switch_queue_trypush (switch_queue_t *queue, void *data) |
|
|
Opaque structure used for queue API |
|
||||||||||||||||
|
create a FIFO queue
00762 {
00763 return apr_queue_create(queue, queue_capacity, pool);
00764 }
|
|
||||||||||||
|
pop/get an object from the queue, blocking if the queue is already empty
00772 {
00773 return apr_queue_pop(queue, data);
00774 }
|
|
||||||||||||
|
push/add a object to the queue, blocking if the queue is already full
00777 {
00778 apr_status_t s;
00779
00780 do {
00781 s = apr_queue_push(queue, data);
00782 } while (s == APR_EINTR);
00783
00784 return s;
00785 }
|
|
|
returns the size of the queue.
00767 {
00768 return apr_queue_size(queue);
00769 }
|
|
||||||||||||
|
pop/get an object to the queue, returning immediatly if the queue is empty
00788 {
00789 return apr_queue_trypop(queue, data);
00790 }
|
|
||||||||||||
|
push/add a object to the queue, returning immediatly if the queue is full
00793 {
00794 apr_status_t s;
00795
00796 do {
00797 s = apr_queue_trypush(queue, data);
00798 } while (s == APR_EINTR);
00799
00800 return s;
00801 }
|
1.3.9.1