NAME
idm_ops - IDM operations
- Allocation and management routines.
SYNOPSIS
Functions
Push an ID into the free list.
Pop an ID from the free list.
Free all IDs in the list.
Remove a specific ID from the list.
Free a specific ID node.
Drop all IDs managed by an ID manager.
Push IDs up to a given value.
Delete a specific ID from manager.
Allocate a new unique ID.
Detailed Description
Allocation and management routines.
Function Documentation
int idm_del (idm_t * idm, uint32_t id)
Delete a specific ID from manager. Returns 1 if the deletion updated last, else 0.
Parameters
idm ID manager.
id ID to remove.
Returns
1 if success, 0 otherwise.
void idm_drop (idm_t * idm)
Drop all IDs managed by an ID manager.
Parameters
idm ID manager to clear.
uint32_t idm_new (idm_t * idm)
Allocate a new unique ID. Returns a previously freed ID if available, otherwise increments last.
Parameters
idm ID manager.
Returns
New ID value.
uint32_t idm_push (idm_t * idm, uint32_t n)
Push IDs up to a given value.
Parameters
idm ID manager.
n Highest value to reach.
Returns
The ID pushed, or IDM_MISS if out of range.
void ids_drop (ids_t * list)
Free all IDs in the list.
Parameters
list List to clear.
void ids_free (ids_t * list, uint32_t id)
Free a specific ID node. Alias for ids_remove().
Parameters
list List to modify.
id ID to remove.
uint32_t ids_pop (ids_t * list)
Pop an ID from the free list.
Parameters
list List to remove from.
Returns
Removed ID, or IDM_MISS if empty.
void ids_push (ids_t * list, uint32_t id)
Push an ID into the free list.
Parameters
list List to append to.
id ID value to add.
void ids_remove (ids_t * list, uint32_t id)
Remove a specific ID from the list.
Parameters
list List to modify.
id ID to remove.
Author
Generated automatically by Doxygen for corm from the source code.