2 .\" Copyright (c) 2000, Sun Microsystems, Inc.,
3 .\" All Rights Reserved
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH PUT 9F "Apr 28, 1992"
9 put \- call a STREAMS put procedure
13 #include <sys/stream.h>
18 \fBvoid\fR \fBput\fR(\fBqueue_t *\fR\fIq\fR, \fBmblk_t *\fR\fImp\fR);
24 Architecture independent level 1 (DDI/DKI).
32 Pointer to a STREAMS queue.
41 Pointer to message block being passed into queue.
47 \fBput()\fR calls the put procedure ( \fBput\fR(9E) entry point) for the
48 STREAMS queue specified by \fIq\fR, passing it the message block referred to by
49 \fImp\fR. It is typically used by a driver or module to call its own put
54 \fBput()\fR can be called from a STREAMS module or driver put or service
55 routine, or from an associated interrupt handler, timeout, bufcall, or esballoc
56 call-back. In the latter cases, the calling code must guarantee the validity of
60 Since \fBput()\fR may cause re-entry of the module (as it is intended to do),
61 mutexes or other locks should not be held across calls to it, due to the risk
62 of single-party deadlock (\fBput\fR(9E), \fBputnext\fR(9F), \fBputctl\fR(9F),
63 \fBqreply\fR(9F)). This function is provided as a DDI/DKI conforming
64 replacement for a direct call to a put procedure.
68 \fBput\fR(9E), \fBfreezestr\fR(9F), \fBputctl\fR(9F), \fBputctl1\fR(9F),
69 \fBputnext\fR(9F), \fBputnextctl\fR(9F), \fBputnextctl1\fR(9F),
70 \fBqprocson\fR(9F), \fBqreply\fR(9F)
73 \fIWriting Device Drivers\fR
76 \fISTREAMS Programming Guide\fR
80 The caller cannot have the stream frozen when calling this function. See
84 DDI/DKI conforming modules and drivers are no longer permitted to call put
85 procedures directly, but must call through the appropriate STREAMS utility
86 function, for example, \fBput\fR(9E), \fBputnext\fR(9F), \fBputctl\fR(9F), and
87 \fBqreply\fR(9F). This function is provided as a DDI/DKI conforming replacement
88 for a direct call to a put procedure.
91 The \fBput()\fR and \fBputnext()\fR functions should be called only after
92 \fBqprocson()\fR is finished.