#include <misc/result.h>
Go to the source code of this file.
Defines | |
#define | TXC_POOL_OBJECT_FREE 0x1 |
#define | TXC_POOL_OBJECT_ALLOCATED 0x2 |
Typedefs | |
typedef txc_pool_object_s | txc_pool_object_t |
typedef txc_pool_s | txc_pool_t |
typedef void(*) | txc_pool_object_constructor_t (void *obj) |
typedef void(*) | txc_pool_object_print_t (void *obj) |
Functions | |
txc_result_t | txc_pool_create (txc_pool_t **poolp, unsigned int obj_size, unsigned int obj_num, txc_pool_object_constructor_t obj_constructor) |
txc_result_t | txc_pool_destroy (txc_pool_t **poolp) |
txc_result_t | txc_pool_object_alloc (txc_pool_t *pool, void **objp, int lock) |
void | txc_pool_object_free (txc_pool_t *pool, void **objp, int lock) |
txc_pool_object_t * | txc_pool_object_first (txc_pool_t *pool, int obj_status) |
txc_pool_object_t * | txc_pool_object_next (txc_pool_object_t *obj) |
void * | txc_pool_object_of (txc_pool_object_t *obj) |
void | txc_pool_lock (txc_pool_t *pool) |
void | txc_pool_unlock (txc_pool_t *pool) |
void | txc_pool_print (txc_pool_t *pool, txc_pool_object_print_t printer, int verbose) |
This allocator is used by library subsystems that need to preallocate and preinitialize a pool of objects.
Definition in file pool.h.
typedef struct txc_pool_object_s txc_pool_object_t |