nightly: remove unused BINARCHIVE
[unleashed.git] / share / man / man9f / qprocson.9f
blobaca781cbaf68d331f12ef06e7561298125714c64
1 '\" te
2 .\"  Copyright (c) 2006, Sun Microsystems, Inc.,  All Rights Reserved
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 QPROCSON 9F "Jan 16, 2006"
7 .SH NAME
8 qprocson, qprocsoff \- enable, disable put and service routines
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/stream.h>
13 #include <sys/ddi.h>
15 \fBvoid\fR \fBqprocson\fR(\fBqueue_t *\fR\fIq\fR);
16 .fi
18 .LP
19 .nf
20 \fBvoid\fR \fBqprocsoff\fR(\fBqueue_t *\fR\fIq\fR);
21 .fi
23 .SH INTERFACE LEVEL
24 .sp
25 .LP
26 Architecture independent level 1 (DDI/DKI).
27 .SH PARAMETERS
28 .sp
29 .ne 2
30 .na
31 \fB\fIq\fR\fR
32 .ad
33 .RS 5n
34 Pointer to the \fBRD\fR side of a streams queue pair.
35 .RE
37 .SH DESCRIPTION
38 .sp
39 .LP
40 The \fBqprocson()\fR enables the put and service routines of the driver or
41 module whose read queue is pointed to by \fIq\fR. Threads cannot enter the
42 module instance through the put and service routines while they are disabled.
43 .sp
44 .LP
45 The \fBqprocson()\fR function must be called by the open routine of a driver or
46 module before returning, and after any initialization necessary for the proper
47 functioning of the put and service routines.
48 .sp
49 .LP
50 The \fBqprocson()\fR function must be called before calling \fBput\fR(9F),
51 \fBputnext\fR(9F), \fBqbufcall\fR(9F), \fBqtimeout\fR(9F), \fBqwait\fR(9F), or
52 \fBqwait_sig\fR(9F).
53 .sp
54 .LP
55 The \fBqprocsoff()\fR function must be called by the close routine of a driver
56 or module before returning, and before deallocating any resources necessary for
57 the proper functioning of the put and service routines. It also removes the
58 queue's service routines from the service queue, and blocks until any pending
59 service processing completes.
60 .sp
61 .LP
62 The module or driver instance is guaranteed to be single-threaded before
63 \fBqprocson()\fR is called and after \fBqprocsoff()\fR is called, except for
64 threads executing asynchronous events such as interrupt handlers and callbacks,
65 which must be handled separately.
66 .SH CONTEXT
67 .sp
68 .LP
69 These routines can be called from user, interrupt, or kernel context.
70 .SH SEE ALSO
71 .sp
72 .LP
73 \fBclose\fR(9E), \fBopen\fR(9E), \fBput\fR(9E), \fBsrv\fR(9E), \fBput\fR(9F),
74 \fBputnext\fR(9F), \fBqbufcall\fR(9F), \fBqtimeout\fR(9F), \fBqwait\fR(9F),
75 \fBqwait_sig\fR(9F)
76 .sp
77 .LP
78 \fIWriting Device Drivers\fR
79 .sp
80 .LP
81 \fISTREAMS Programming Guide\fR
82 .SH NOTES
83 .sp
84 .LP
85 The caller may not have the stream frozen during either of these calls.