prg_list_cell_remove()
Abstract
Quickly removes a cell from a linked list.
Syntax
prg_list_cell_remove (list_ptr, cell_ptr)
| Argument | Type | Description |
|---|---|---|
list_ptr |
PrgT_List * |
List of interest |
cell_ptr |
PrgT_List_Cell * |
Cell to be removed |
Return Type
void
No return value.
Header
prg_list_funcs.h
Details
This function is implemented as by inline definitions for faster operation. No error checking is done to verify the validity of the cell pointer. This function deallocates the cell memory, but the caller is responsible for deallocating the cell contents.
WARNING: This function is MT unsafe, as described in “Multi-Threading Safety“ on page 11. Access to shared lists must be externally serialized.
Purpose:
This function provides a way to quickly remove a list element. It can be used when doing fast iterations over linked lists.
Errors:
- Program Abort: Segmentation violation. (due to an illegal list pointer, cell pointer, or malformed list)
Reference:
- use
prg_list_head_cell_get()to obtain a reference to the head cell of a list - use
prg_list_cell_next_get()to obtain a reference to the next cell of a list - use
prg_list_cell_data_get()to obtain the data associated with a specific cell