prg_list_cell_from_index_get()

Abstract

Gets a reference to the list cell at the specified index.

Syntax

prg_list_cell_from_index_get (list_ptr, index)
Argument Type Description
list_ptr PrgT_List * List of interest.
index int Index of the desired cell.
Indices start at 0 at the head of the list and increment by one until the tail is reached. Instead of a numeric index, an abstract list position index can be specified; the acceptable values are PRGC_LISTPOS_HEAD and PRGC_LISTPOS_TAIL.

Return Type

PrgT_List_Cell *

The requested cell, or PRGC_NIL if the index is invalid.

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 its position in the list.

Errors:

  • Program Abort: Segmentation violation. (due to an illegal list pointer or malformed list)

Reference:

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com