'\" 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] .TH backq 9F "16 Jan 2006" "SunOS 5.11" "Kernel Functions for Drivers" .SH NAME backq \- get pointer to the queue behind the current queue .SH SYNOPSIS .LP .nf #include \fBqueue_t *\fR\fBbackq\fR(\fBqueue_t *\fR\fIcq\fR); .fi .SH INTERFACE LEVEL .sp .LP Architecture independent level 1 (DDI/DKI). .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIcq\fR\fR .ad .RS 6n .rt The pointer to the current queue. \fBqueue_t\fR is an alias for the \fBqueue\fR(9S) structure. .RE .SH DESCRIPTION .sp .LP The \fBbackq()\fR function returns a pointer to the queue preceding \fIcq\fR (the current queue). If \fIcq\fR is a read queue, \fBbackq()\fR returns a pointer to the queue downstream from \fIcq\fR, unless it is the stream end. If \fIcq\fR is a write queue, \fBbackq()\fR returns a pointer to the next queue upstream from \fIcq\fR, unless it is the stream head. .SH RETURN VALUES .sp .LP If successful, \fBbackq()\fR returns a pointer to the queue preceding the current queue. Otherwise, it returns \fINULL.\fR .SH CONTEXT .sp .LP The \fBbackq()\fR function can be called from user, interrupt, or kernel context. .SH SEE ALSO .sp .LP \fBqueue\fR(9S) .sp .LP \fIWriting Device Drivers\fR .sp .LP \fISTREAMS Programming Guide\fR