General Utility to store a back pointer to another pointer.
More...
General Utility to store a back pointer to another pointer.
Maintained in a dlq_hdr_t queue
Const Back Pointers
The ncx_backptr_t is used for both constant and malloced back-pointers. The caller needs to know which free function to use.
◆ ncx_clean_backptrQ()
void ncx_clean_backptrQ |
( |
dlq_hdr_t * |
backptrQ | ) |
|
◆ ncx_clean_mbackptrQ()
void ncx_clean_mbackptrQ |
( |
dlq_hdr_t * |
backptrQ | ) |
|
Clean an entire Q of ncx_backptr_t structs Use ncx_free_mbackptr to free node pointers.
- Parameters
-
◆ ncx_find_backptr()
ncx_backptr_t * ncx_find_backptr |
( |
const dlq_hdr_t * |
que, |
|
|
void * |
node |
|
) |
| |
Find the specified back pointer struct.
- Parameters
-
- Returns
- pointer to the found backptr entry or NULL if not found
◆ ncx_first_backptr()
Get first back pointer struct.
- Parameters
-
- Returns
- pointer to first entry or NULL if none
◆ ncx_first_const_backptr()
const ncx_backptr_t * ncx_first_const_backptr |
( |
const dlq_hdr_t * |
que | ) |
|
Get first back pointer struct CONST.
- Parameters
-
- Returns
- pointer to first entry or NULL if none
◆ ncx_free_backptr()
◆ ncx_free_mbackptr()
Free an ncx_backptr_t struct; Free the 'node' pointer first.
Only use this function if the back pointer node can be released by calling the __free macro. Do not use if a special free function is needed
- Parameters
-
- See also
- ncx_new_backptr
◆ ncx_get_backptr_node()
Get the back pointer node pointer.
- Parameters
-
- Returns
- pointer to node within backptr
◆ ncx_get_const_backptr_node()
const void * ncx_get_const_backptr_node |
( |
const ncx_backptr_t * |
backptr | ) |
|
Get the back pointer node pointer CONST.
- Parameters
-
- Returns
- pointer to node within backptr
◆ ncx_last_backptr()
Get last back pointer struct.
- Parameters
-
- Returns
- pointer to last entry or NULL if none
◆ ncx_new_backptr()
Malloc and initialize a new ncx_backptr_t struct.
- Parameters
-
node | pointer to cache in the back-ptr struct |
- Returns
- malloced struct or NULL if memory error
◆ ncx_next_backptr()
Get next back pointer struct.
- Parameters
-
- Returns
- pointer to next entry or NULL if none
◆ ncx_next_const_backptr()
Get next back pointer struct CONST.
- Parameters
-
- Returns
- pointer to next entry or NULL if none
◆ ncx_prev_backptr()
Get previous back pointer struct.
- Parameters
-
- Returns
- pointer to previous entry or NULL if none
◆ ncx_remove_backptr()
Remove the specified backptr for deletion.
- Parameters
-