Buffer
Files | |
file | k_buffer.h |
Messaging Buffer Wrapper. | |
Data Structures | |
struct | k_buffer |
Macros | |
#define | K_ALLOC_MALLOC |
#define | K_BUFFER_NEW(n, d, s) K_BUFFER_NEW_MALLOC(n, d, s) |
#define | K_BUFFER_FREE(b) K_BUFFER_FREE_MALLOC(b) |
#define | K_BUFFER_REALLOC(b, s) K_BUFFER_REALLOC_MALLOC(b, s) |
Typedefs | |
typedef struct k_buffer | k_buffer_t |
Functions | |
void | k_buffer_init () |
k_buffer_t * | k_buffer_alloc (struct k_buffer *next, void *data, size_t size, k_alloc_t *alloc) |
int | k_buffer_realloc_new (k_buffer_t *buffer, size_t new_size, k_alloc_t *alloc) |
void | k_buffer_free_new (k_buffer_t *buffer, k_alloc_t *alloc) |
k_buffer_t * | k_buffer_new (void *data, size_t size) |
k_buffer_t * | k_buffer_add (struct k_buffer *next, void *data, size_t size) |
size_t | k_buffer_size (k_buffer_t *buffer) |
int | k_buffer_realloc (k_buffer_t *buffer, size_t new_size) |
void | k_buffer_free (k_buffer_t *buffer) |
Macro Definition Documentation
#define K_ALLOC_MALLOC |
#define K_BUFFER_FREE | ( | b | ) | K_BUFFER_FREE_MALLOC(b) |
#define K_BUFFER_NEW | ( | n, | |
d, | |||
s | |||
) | K_BUFFER_NEW_MALLOC(n, d, s) |
#define K_BUFFER_REALLOC | ( | b, | |
s | |||
) | K_BUFFER_REALLOC_MALLOC(b, s) |
Typedef Documentation
typedef struct k_buffer k_buffer_t |
Function Documentation
k_buffer_t* k_buffer_add | ( | struct k_buffer * | next, |
void * | data, | ||
size_t | size | ||
) |
k_buffer_t* k_buffer_alloc | ( | struct k_buffer * | next, |
void * | data, | ||
size_t | size, | ||
k_alloc_t * | alloc | ||
) |
void k_buffer_free | ( | k_buffer_t * | buffer | ) |
void k_buffer_free_new | ( | k_buffer_t * | buffer, |
k_alloc_t * | alloc | ||
) |
void k_buffer_init | ( | ) |
k_buffer_t* k_buffer_new | ( | void * | data, |
size_t | size | ||
) |
int k_buffer_realloc | ( | k_buffer_t * | buffer, |
size_t | new_size | ||
) |
int k_buffer_realloc_new | ( | k_buffer_t * | buffer, |
size_t | new_size, | ||
k_alloc_t * | alloc | ||
) |
size_t k_buffer_size | ( | k_buffer_t * | buffer | ) |