Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / quntimeout.9f
bloba5afa3e41661b40a457df87318d72740cd469b4b
1 '\" te
2 .\"  Copyright 2006 Sun Microsystems.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH QUNTIMEOUT 9F "Jan 16, 2006"
7 .SH NAME
8 quntimeout \- cancel previous qtimeout function call
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/stream.h>
13 #include <sys/ddi.h>
17 \fBclock_t\fR \fBquntimeout\fR(\fBqueue_t\fR \fI*q\fR, \fBtimeout_id_t\fR \fIid\fR);
18 .fi
20 .SH INTERFACE LEVEL
21 .sp
22 .LP
23 Solaris DDI specific (Solaris DDI).
24 .SH PARAMETERS
25 .sp
26 .ne 2
27 .na
28 \fB\fIq\fR\fR
29 .ad
30 .RS 6n
31 Pointer to a \fBSTREAMS \fRqueue structure.
32 .RE
34 .sp
35 .ne 2
36 .na
37 \fB\fIid\fR\fR
38 .ad
39 .RS 6n
40 Opaque timeout \fBID\fR a previous \fBqtimeout\fR(9F) call.
41 .RE
43 .SH DESCRIPTION
44 .sp
45 .LP
46 The \fBquntimeout()\fR function cancels a pending \fBqtimeout\fR(9F) request.
47 The \fBquntimeout()\fR function is tailored to be used with the enhanced
48 \fBSTREAMS\fR framework interface, which is based on the concept of perimeters.
49 (See \fBmt-streams\fR(9F).) \fBquntimeout()\fR returns when the timeout has
50 been cancelled or finished executing. The timeout will be cancelled even if it
51 is blocked at the perimeters associated with the queue. \fBquntimeout()\fR
52 should be executed for all outstanding timeouts before a driver or module close
53 returns. All outstanding timeouts and bufcalls must be cancelled before a
54 driver close routine can block and before the close  routine calls
55 \fBqprocsoff\fR(9F).
56 .SH RETURN VALUES
57 .sp
58 .LP
59 The \fBquntimeout()\fR function returns \fB-1\fR if the \fBid\fR is not found.
60 Otherwise, \fBquntimeout()\fR returns a \fB0\fR or positive value.
61 .SH CONTEXT
62 .sp
63 .LP
64 The \fBquntimeout()\fR function can be called from user, interrupt, or kernel
65 context.
66 .SH SEE ALSO
67 .sp
68 .LP
69 \fBmt-streams\fR(9F), \fBqbufcall\fR(9F), \fBqtimeout\fR(9F),
70 \fBqunbufcall\fR(9F)
71 .sp
72 .LP
73 \fIWriting Device Drivers\fR
74 .sp
75 .LP
76 \fISTREAMS Programming Guide\fR