diff options
author | gibbs <gibbs@FreeBSD.org> | 1996-03-31 03:21:45 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1996-03-31 03:21:45 +0000 |
commit | 1f233472df4a82eba0fe2bd474203b4c65f791d4 (patch) | |
tree | 438e0bba33971f8e0c06603b584a2efd73024340 /share | |
parent | c6c3051dbc6e90b53a7d4fe587d8e3d20ebf96cf (diff) | |
download | FreeBSD-src-1f233472df4a82eba0fe2bd474203b4c65f791d4.zip FreeBSD-src-1f233472df4a82eba0fe2bd474203b4c65f791d4.tar.gz |
Implement the SLIST and the STAILQ macros. This gives a program all the
aesthetics of using the 4.4 queue macros without paying undo space or time
in scenartios where a singly-linked list works fine.
From queue.h:
/*
* A singly-linked list is headed by a single forward pointer. The elements
* are singly linked for minimum space and pointer manipulation overhead at
* the expense of O(n) removal for arbitrary elements. New elements can be
* added to the list after an existing element or at the head of the list.
* Elements being removed from the head of the list should use the explicit
* macro for this purpose for optimum efficiency. A singly-linked list may
* only be traversed in the forward direction. Singly-linked lists are ideal
* for applications with large datasets and few or no removals or for
* implementing a LIFO queue.
*
* A singly-linked tail queue is headed by a pair of pointers, one to the
* head of the list and the other to the tail of the list. The elements are
* singly linked for minimum space and pointer manipulation overhead at the
* expense of O(n) removal for arbitrary elements. New elements can be added
* to the list after an existing element, at the head of the list, or at the
* end of the list. Elements being removed from the head of the tail queue
* should use the explicit macro for this purpose for optimum efficiency.
* A singly-linked tail queue may only be traversed in the forward direction.
* Singly-linked tail queues are ideal for applications with large datasets
* and few or no removals or for implementing a FIFO queue.
*/
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions