xref: /illumos-gate/usr/src/man/man9f/backq.9f (revision 3ce33fb052b375020ea4249290d33b834d9f9e75)
te
Copyright 1989 AT&T
Copyright (c) 2006, Sun Microsystems, Inc.
All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
BACKQ 9F "Jan 16, 2006"
NAME
backq - get pointer to the queue behind the current queue
SYNOPSIS

#include <sys/stream.h>



queue_t *backq(queue_t *cq);
INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI).

PARAMETERS
cq

The pointer to the current queue. queue_t is an alias for the queue(9S) structure.

DESCRIPTION

The backq() function returns a pointer to the queue preceding cq (the current queue). If cq is a read queue, backq() returns a pointer to the queue downstream from cq, unless it is the stream end. If cq is a write queue, backq() returns a pointer to the next queue upstream from cq, unless it is the stream head.

RETURN VALUES

If successful, backq() returns a pointer to the queue preceding the current queue. Otherwise, it returns NULL.

CONTEXT

The backq() function can be called from user, interrupt, or kernel context.

SEE ALSO

queue(9S)

Writing Device Drivers

STREAMS Programming Guide