| INSQUE(3) | Library Functions Manual | INSQUE(3) |
insque, remque
— legacy doubly linked lists
#include
<search.h>
void
insque(void
*elem, void
*pred);
void
remque(void
*elem);
insque()
and remque() manipulate a legacy variety of
intrusive doubly linked lists. A list can be either circular or linear. Each
element in the list must be of the following form:
struct qelem {
struct qelem *q_forw;
struct qelem *q_back;
char q_data[];
};
The first two members of the struct must be pointers of the same type that point to the next and previous elements in the list, respectively. Any subsequent data in the struct is application-dependent.
The
insque()
function inserts elem into a list immediately after
pred.
The
remque()
function removes elem from the list.
These functions are not atomic.
The insque() and
remque() functions conform to the X/Open System
Interfaces option of the IEEE Std 1003.1-2008
(“POSIX.1”) specification.
The insque() and
remque() functions are derived from the
insque and remque
instructions on the VAX. They first appeared in
4.2BSD.
| April 26, 2020 | Debian |