9022 loader.efi: module placement must check memory map
[unleashed.git] / share / man / man9f / ldi_putmsg.9f
bloba1ded6c62d9dd0be3a16f46c8dbd6ee1d4062920
1 '\" te
2 .\" Copyright (c) 2003, 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 LDI_PUTMSG 9F "Jun 3, 2003"
7 .SH NAME
8 ldi_putmsg, ldi_getmsg \- Read/write message blocks from/to a stream
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/sunldi.h>
14 \fBint\fR \fBldi_putmsg\fR(\fBldi_handle_t\fR\fI lh\fR, \fBmblk_t *\fR\fIsmp\fR);
15 .fi
17 .LP
18 .nf
19 \fBint\fR \fB ldi_getmsg\fR(\fBldi_handle_t\fR \fIlh\fR, \fBmblk_t **\fR\fIrmp\fR, \fBtimestruc_t *\fR\fItimeo\fR);
20 .fi
22 .SH PARAMETERS
23 .sp
24 .ne 2
25 .na
26 \fB\fIlh\fR \fR
27 .ad
28 .RS 10n
29 Layered handle.
30 .RE
32 .sp
33 .ne 2
34 .na
35 \fB\fIsmp\fR \fR
36 .ad
37 .RS 10n
38 Message block to send.
39 .RE
41 .sp
42 .ne 2
43 .na
44 \fB\fIrmp\fR \fR
45 .ad
46 .RS 10n
47 Message block to receive.
48 .RE
50 .sp
51 .ne 2
52 .na
53 \fB\fItimeo\fR \fR
54 .ad
55 .RS 10n
56 Optional timeout for data reception.
57 .RE
59 .SH DESCRIPTION
60 .sp
61 .LP
62 The \fBldi_putmsg\fR function allows a caller to send a message block to a
63 streams device specified by the layered handle \fIlh\fR. Once the message (smp)
64 has been passed to \fBldi_putmsg()\fR, the caller must not free the message
65 even if an error occurs.
66 .sp
67 .LP
68 The \fBldi_getmsg()\fR function allows a caller to receive a message block from
69 a streams device specified by the layered handle \fIlh\fR. Callers must free
70 the message received with \fBfreemsg\fR(9F).
71 .sp
72 .LP
73 If a NULL timeout value is specified when the caller receives a message, the
74 caller sleeps until a message is received.
75 .SH RETURN VALUES
76 .sp
77 .LP
78 The \fBldi_putmsg()\fR and \fBldi_getmsg()\fR functions return \fB0\fR upon
79 success. If a failure occurs before the request is passed to the device, the
80 possible return values are shown below. Otherwise any other error number may be
81 returned by the device.
82 .sp
83 .ne 2
84 .na
85 \fBEINVAL\fR
86 .ad
87 .RS 11n
88 Invalid input parameters.
89 .RE
91 .sp
92 .ne 2
93 .na
94 \fBENOTSUP\fR
95 .ad
96 .RS 11n
97 Operation is not supported for this device.
98 .sp
99 The \fBldi_getmsg()\fR function may also return:
101 .ne 2
103 \fBETIME\fR
105 .RS 9n
106 Returned if the timeout \fBtimeo\fR expires with no messages received.
111 .SH CONTEXT
114 These functions may be called from user or kernel context.