Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / backq.9f
blob8e041b6bb8bace1f7e9f2e9812c3a88d07f3e680
1 '\" te
2 .\"  Copyright 1989 AT&T
3 .\" Copyright (c) 2006, Sun Microsystems, Inc.
4 .\"  All Rights Reserved
5 .\" 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.
6 .\" 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.
7 .\" 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]
8 .TH BACKQ 9F "Jan 16, 2006"
9 .SH NAME
10 backq \- get pointer to the queue behind the current queue
11 .SH SYNOPSIS
12 .LP
13 .nf
14 #include <sys/stream.h>
18 \fBqueue_t *\fR\fBbackq\fR(\fBqueue_t *\fR\fIcq\fR);
19 .fi
21 .SH INTERFACE LEVEL
22 .sp
23 .LP
24 Architecture independent level 1 (DDI/DKI).
25 .SH PARAMETERS
26 .sp
27 .ne 2
28 .na
29 \fB\fIcq\fR\fR
30 .ad
31 .RS 6n
32 The pointer to the current queue.   \fBqueue_t\fR is an alias for the
33 \fBqueue\fR(9S) structure.
34 .RE
36 .SH DESCRIPTION
37 .sp
38 .LP
39 The \fBbackq()\fR function returns a pointer to the queue preceding \fIcq\fR
40 (the current queue). If \fIcq\fR is a read queue, \fBbackq()\fR returns a
41 pointer to the queue downstream from \fIcq\fR, unless it is the stream end. If
42 \fIcq\fR is a write queue, \fBbackq()\fR returns a pointer to the next queue
43 upstream from \fIcq\fR, unless it is the stream head.
44 .SH RETURN VALUES
45 .sp
46 .LP
47 If successful, \fBbackq()\fR returns a pointer to the queue preceding the
48 current queue. Otherwise, it returns \fINULL.\fR
49 .SH CONTEXT
50 .sp
51 .LP
52 The \fBbackq()\fR function can be called from user, interrupt, or kernel
53 context.
54 .SH SEE ALSO
55 .sp
56 .LP
57 \fBqueue\fR(9S)
58 .sp
59 .LP
60 \fIWriting Device Drivers\fR
61 .sp
62 .LP
63 \fISTREAMS Programming Guide\fR