1INSQUE(3) Linux Programmer's Manual INSQUE(3)
2
3
4
6 insque, remque - insert/remove an item from a queue
7
9 #include <search.h>
10
11 void insque(void *elem, void *prev);
12
13 void remque(void *elem);
14
15 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
16
17 insque(), remque(): _SVID_SOURCE || _XOPEN_SOURCE >= 500
18
20 insque() and remque() are functions for manipulating doubly-linked
21 lists. Each element in the list is a structure of which the first two
22 structure elements are a forward and a backward pointer.
23
24 insque() inserts the element pointed to by elem immediately after the
25 element pointed to by prev, which must not be NULL.
26
27 remque() removes the element pointed to by elem from the doubly-linked
28 list.
29
31 POSIX.1-2001.
32
34 Traditionally (e.g., SunOS, Linux libc 4 and libc 5), the arguments of
35 these functions were of type struct qelem *, defined as:
36
37 struct qelem {
38 struct qelem *q_forw;
39 struct qelem *q_back;
40 char q_data[1];
41 };
42
43 This is still what you will get if _GNU_SOURCE is defined before
44 including <search.h>.
45
46 The location of the prototypes for these functions differs among sev‐
47 eral versions of Unix. The above is the POSIX version. Some systems
48 place them in <string.h>. Linux libc4 and libc 5 placed them in
49 <stdlib.h>.
50
52 This page is part of release 3.25 of the Linux man-pages project. A
53 description of the project, and information about reporting bugs, can
54 be found at http://www.kernel.org/doc/man-pages/.
55
56
57
58 2008-07-11 INSQUE(3)