|
libamxc
1.10.3
C Generic Data Containers
|
Ambiorix ring buffer API implementation. More...
#include <stdlib.h>#include <string.h>#include <unistd.h>#include <amxc/amxc_rbuffer.h>#include <amxc/amxc_macros.h>Go to the source code of this file.
Functions | |
| static char * | amxc_rbuffer_alloc (amxc_rbuffer_t *const rb, const size_t size) |
| int | amxc_rbuffer_new (amxc_rbuffer_t **rb, const size_t size) |
| Allocates a ring buffer. More... | |
| void | amxc_rbuffer_delete (amxc_rbuffer_t **rb) |
| Frees the previously allocated ring buffer. More... | |
| int | amxc_rbuffer_init (amxc_rbuffer_t *const rb, const size_t size) |
| Initializes a ring buffer. More... | |
| void | amxc_rbuffer_clean (amxc_rbuffer_t *const rb) |
| Frees the buffer and sets all pointers of the ring buffer structure to NULL. More... | |
| int | amxc_rbuffer_grow (amxc_rbuffer_t *const rb, const size_t size) |
| Grows the ring buffer. More... | |
| int | amxc_rbuffer_shrink (amxc_rbuffer_t *const rb, const size_t size) |
| Shrinks the ring buffer. More... | |
| ssize_t | amxc_rbuffer_read (amxc_rbuffer_t *const rb, char *const buf, size_t count) |
| Reads a number of bytes from the ring buffer. More... | |
| ssize_t | amxc_rbuffer_write (amxc_rbuffer_t *const rb, const char *const buf, const size_t count) |
| Writes a number of bytes to the ring buffer. More... | |
| size_t | amxc_rbuffer_size (const amxc_rbuffer_t *const rb) |
| Get the size of the data stored in the ring buffer. More... | |
Ambiorix ring buffer API implementation.
Definition in file amxc_rbuffer.c.
|
static |
Definition at line 62 of file amxc_rbuffer.c.