insque(3)

insque3

Doubly-linked list management

Usage

#include <search.h>

void

insque(void *element, void *pred);

void

remque(void *element);

Library

Standard C Library (libc, -lc)

Overview

The insque() and remque() functions encapsulate the ever-repeating task of doing insertion and removal operations on doubly linked lists. The functions expect their arguments to point to a structure whose first and second members are pointers to the next and previous element, respectively. The insque() function also allows the pred argument to be a NULL pointer for the initialization of a new list's head element.

Releases

163 releases since Mac OS X 10.0; the text changed 3 times.

  1. 10.0–10.1.5
  2. 10.2–10.2.8
  3. 10.3–10.4.11
  4. 10.5–26.5

Standards

The insque() and remque() functions conform to IEEE Std 1003.1-2001 (“POSIX.1”).

History

The insque() and remque() functions appeared in 4.2BSD. In FreeBSD 5.0, they reappeared conforming to IEEE Std 1003.1-2001 (“POSIX.1”).

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.