prg_list_cell_from_data_get()
Abstract
Gets a reference to the first cell of a list that contains the specified data.
Syntax
prg_list_cell_from_data_get (list_ptr, data_ptr)
| Argument | Type | Description |
|---|---|---|
list_ptr |
PrgT_List * |
List of interest. |
data_ptr |
VosT_Address |
Data to look for. |
Return Type
PrgT_List_Cell *
The requested cell, or PRGC_NIL if the data is not found.
Header
prg_list_funcs.h
Details
None.
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 obtain a reference to a list cell based on the data it contains.
Errors:
- Program Abort: Segmentation violation. (due to an illegal list 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_from_index_get()to obtain a reference to a cell based on its index