[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

insque or remque Subroutine

Purpose

Inserts or removes an element in a queue.

Library

Standard C Library (libc.a)

Syntax

#include <search.h>

insque (Element, Pred)
void *Element, *Pred;
remque (Element)
void *Element;

Description

The insque and remque subroutines manipulate queues built from double-linked lists. Each element in the queue must be in the form of a qelem structure. The next and prev elements of that structure must point to the elements in the queue immediately before and after the element to be inserted or deleted.

The insque subroutine inserts the element pointed to by the Element parameter into a queue immediately after the element pointed to by the Pred parameter.

The remque subroutine removes the element defined by the Element parameter from a queue.

Parameters

Pred Points to the element in the queue immediately before the element to be inserted or deleted.
Element Points to the element in the queue immediately after the element to be inserted or deleted.

Implementation Specifics

These subroutines are part of Base Operating System (BOS) Runtime.

Related Information

Searching and Sorting Example Program in AIX General Programming Concepts: Writing and Debugging Programs.

Subroutines Overview in AIX General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]