CNDP
22.08.0
|
Go to the source code of this file.
Macros | |
#define | DEFAULT_MAX_THREADS 512 |
Typedefs | |
typedef void * | u_id_t |
Functions | |
CNDP_API u_id_t | uid_find_by_name (const char *name) |
CNDP_API uint16_t | uid_max_ids (u_id_t _e) |
CNDP_API uint16_t | uid_allocated (u_id_t _e) |
CNDP_API u_id_t | uid_register (const char *name, uint16_t cnt) |
CNDP_API int | uid_unregister (u_id_t _e) |
CNDP_API int | uid_alloc (u_id_t _e) |
CNDP_API void | uid_free (u_id_t _e, int idx) |
CNDP_API int | uid_test (u_id_t *e, int uid) |
CNDP_API void | uid_dump (FILE *f) |
API for User Index allocation
Definition in file uid.h.
#define DEFAULT_MAX_THREADS 512 |
CNDP_API u_id_t uid_find_by_name | ( | const char * | name | ) |
Find a UID entry given the name of the UID
name | String used to locate the UID structure |
CNDP_API uint16_t uid_max_ids | ( | u_id_t | _e | ) |
Return the max size of the UID pool.
_e | The pointer to the uid_entry structure |
CNDP_API uint16_t uid_allocated | ( | u_id_t | _e | ) |
Return the current number of allocated UIDs
_e | The pointer to the uid_entry structure |
CNDP_API u_id_t uid_register | ( | const char * | name, |
uint16_t | cnt | ||
) |
Add a new UID set of IDs based on the total count
name | The name of the UID entry |
cnt | The max number of IDs from 0 - cnt possible. |
CNDP_API int uid_unregister | ( | u_id_t | _e | ) |
Delete a UID entry created by uid_register()
_e | The opaque pointer value to delete |
CNDP_API int uid_alloc | ( | u_id_t | _e | ) |
Allocate a unique ID value from a UID entry
_e | The opaque pointer value to allocate from |
CNDP_API void uid_free | ( | u_id_t | _e, |
int | idx | ||
) |
Release a index value back to the UID entry (free)
_e | The UID to free the index value to |
idx | The index value to free or release |
CNDP_API int uid_test | ( | u_id_t * | e, |
int | uid | ||
) |
Test to see if a bit is set in the bitmap (or cleared in this case)
e | The u_id_t structure pointer to be tested using the uid bit index. |
uid | The uid bit to test, if the bit is cleared then it is allocated. |
CNDP_API void uid_dump | ( | FILE * | f | ) |
Dump out all of the UID structures.
f | File descriptor pointer to write the output, if NULL use stdout |