NAME
insque
, remque
— legacy doubly linked
lists
SYNOPSIS
#include
<search.h>
void
insque
(void
*elem, void
*pred);
void
remque
(void
*elem);
DESCRIPTION
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.
SEE ALSO
STANDARDS
The insque
() and
remque
() functions conform to the X/Open System
Interfaces option of the IEEE Std 1003.1-2008
(“POSIX.1”) specification.
HISTORY
The insque
() and
remque
() functions are derived from the
insque
and remque
instructions on the VAX. They first appeared in
4.2BSD.