168 q->
buf[q->
in++] = *src++;
193 while(size && q->
bytes)
195 *dst++ = q->
buf[q->
out++];
dst_t dst
DST start and stop in GMT epoch.
size_t queue_push_buffer(queue_t *q, uint8_t *src, size_t size)
Add a data buffer to the ring buffer Note: This function does not wait/block util there is enough fre...
Master include file for project Includes all project includes and defines here.
void queue_flush(queue_t *q)
Flush ring buffer.
size_t queue_full(queue_t *q)
Is the ring buffer full ?
int queue_pushc(queue_t *q, uint8_t c)
Add a byte to the ring buffer Note: This function does not wait/block util there is enough free space...
void queue_del(queue_t *q)
Delete a ring buffer and free memory.
size_t queue_space(queue_t *q)
Find the amount of free space remaining in the ring buffer.
int queue_popc(queue_t *q)
Remove a byte from the ring buffer Note: This function does not wait/block util there is data to meet...
queue_t * queue_new(size_t size)
Create a ring buffer of a given size.
size_t queue_empty(queue_t *q)
Is the ring buffer empty ?
size_t queue_pop_buffer(queue_t *q, uint8_t *dst, size_t size)
Get a data buffer from the ring buffer. Note: This function does not wait/block until there is enough...
size_t queue_used(queue_t *q)
Find the number of bytes used by the ring buffer.
MEMSPACE void safefree(void *p)
Safe free - Only free a pointer if it is in malloc memory range. We want to try to catch frees of sta...
MEMSPACE void * safecalloc(size_t nmemb, size_t size)
Safe Calloc - Display Error message if Calloc fails.