1INSQUE(3)                  Linux Programmer's Manual                 INSQUE(3)
2
3
4

NAME

6       insque, remque - insert/remove an item from a queue
7

SYNOPSIS

9       #include <search.h>
10
11       void insque(void *elem, void *prev);
12       void remque(void *elem);
13

DESCRIPTION

15       insque()  and  remque()  are  functions  for manipulating doubly-linked
16       lists.  Each element in the list is a structure of which the first  two
17       structure elements are a forward and a backward pointer.
18
19       insque()  inserts  the element pointed to by elem immediately after the
20       element pointed to by prev, which must not be NULL.
21
22       remque() removes the element pointed to by elem from the  doubly-linked
23       list.
24

CONFORMING TO

26       POSIX.1-2001
27

HISTORICAL NOTES

29       Traditionally  (e.g.  SunOS,  Linux  libc  4,5) the parameters of these
30       functions were of type struct qelem *, where the struct is defined as
31
32              struct qelem {
33                  struct    qelem *q_forw;
34                  struct    qelem *q_back;
35                  char      q_data[1];
36              };
37
38       This is still what you  will  get  if  _GNU_SOURCE  is  defined  before
39       including <search.h>.
40
41       The  location  of the prototypes for these functions differs among sev‐
42       eral versions of UNIX.  The above is the POSIX version.   Some  systems
43       place them in <string.h>.  Linux libc4,5 placed them in <stdlib.h>.
44
45
46
47                                  2003-08-11                         INSQUE(3)
Impressum