140
K
A
DAK
AMX Linked List Manager
12.2 Linked Lists
Terminology
A list header is a structure provided by the application to be used to anchor a list. The
list header is used to identify a list. The content of the list header is private to the Linked
List Manager.
An object is an application data structure which represents the elements which reside on
a list. For example, AMX maintains a list of Task Control Blocks (TCBs). Each TCB is
an instance of a data structure representing the state of a task. Hence, the TCB qualifies
as an object.
A list node is a structure embedded in an object. The list node is used to link the object
into a simple doubly linked list. The content of the list node is private to the Linked List
Manager.
A key is a 16-bit unsigned integer which is used to determine the order of objects in a
keyed list. Each object in a keyed list must have a key. Objects in a keyed list are
ordered such that key values are monotonically increasing from the head of the list to the
tail of the list.
A key node is a structure embedded in an object. The key node is used to link the object
into a keyed list. The object's key resides in the key node. The content of the key node is
private to the Linked List Manager.
The head of a list is the first object on a list. The tail of a list is the last object on a list.
An empty list has no head or tail. If only one object is on a list, it is both the head and
tail of the list.
The node offset is the offset (i.e. displacement) into an object at which the list node (or
key node) resides. The node offset assigned for a particular list is fixed. Any object
which can reside on the list must have a list node (or key node) in the object at the node
offset assigned to that list.