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"
8 qprocson, qprocsoff \- enable, disable put and service routines
12 #include <sys/stream.h>
15 \fBvoid\fR \fBqprocson\fR(\fBqueue_t *\fR\fIq\fR);
20 \fBvoid\fR \fBqprocsoff\fR(\fBqueue_t *\fR\fIq\fR);
26 Architecture independent level 1 (DDI/DKI).
34 Pointer to the \fBRD\fR side of a streams queue pair.
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.
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.
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
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.
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.
69 These routines can be called from user, interrupt, or kernel context.
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),
78 \fIWriting Device Drivers\fR
81 \fISTREAMS Programming Guide\fR
85 The caller may not have the stream frozen during either of these calls.