Unleashed v1.4
[unleashed.git] / share / man / man3c / door_return.3c
blob25a2f46d8de3f5caca000330f1c30c1f7c277c2b
1 '\" te
2 .\" Copyright (c) 2005, 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 DOOR_RETURN 3C "Mar 22, 2005"
7 .SH NAME
8 door_return \- return from a door invocation
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBcc\fR \fB-mt\fR [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ]
13 #include <door.h>
15 \fBint\fR \fBdoor_return\fR(\fBchar *\fR\fIdata_ptr\fR, \fBsize_t\fR \fIdata_size\fR, \fBdoor_desc_t *\fR\fIdesc_ptr\fR,
16      \fBuint_t\fR \fInum_desc\fR);
17 .fi
19 .SH DESCRIPTION
20 .LP
21 The \fBdoor_return()\fR function returns from a door invocation. It returns
22 control to the thread that issued the associated \fBdoor_call()\fR and blocks
23 waiting for the next door invocation. See \fBdoor_call\fR(3C). Results, if any,
24 from the door invocation are passed back to the client in the buffers pointed
25 to by \fIdata_ptr\fR and \fIdesc_ptr\fR. If there is not a client associated
26 with the \fBdoor_return()\fR, the calling thread discards the results, releases
27 any passed descriptors with the \fBDOOR_RELEASE\fR attribute, and blocks
28 waiting for the next door invocation.
29 .SH RETURN VALUES
30 .LP
31 Upon successful completion, \fBdoor_return()\fR does not return to the calling
32 process. Otherwise, \fBdoor_return()\fR returns \fB\(mi1\fR to the calling
33 process and sets \fBerrno\fR to indicate the error.
34 .SH ERRORS
35 .LP
36 The \fBdoor_return()\fR function fails and returns to the calling process if:
37 .sp
38 .ne 2
39 .na
40 \fB\fBE2BIG\fR\fR
41 .ad
42 .RS 10n
43 Arguments were too big for client.
44 .RE
46 .sp
47 .ne 2
48 .na
49 \fB\fBEFAULT\fR\fR
50 .ad
51 .RS 10n
52 The address of \fIdata_ptr\fR or \fIdesc_ptr\fR is invalid.
53 .RE
55 .sp
56 .ne 2
57 .na
58 \fB\fBEINVAL\fR\fR
59 .ad
60 .RS 10n
61 Invalid \fBdoor_return()\fR arguments were passed or a thread is bound to a
62 door that no longer exists.
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fBEMFILE\fR\fR
69 .ad
70 .RS 10n
71 The client has too many open descriptors.
72 .RE
74 .SH ATTRIBUTES
75 .LP
76 See \fBattributes\fR(5) for descriptions of the following attributes:
77 .sp
79 .sp
80 .TS
81 box;
82 c | c
83 l | l .
84 ATTRIBUTE TYPE  ATTRIBUTE VALUE
86 Architecture    all
88 Interface Stability     Stable
90 MT-Level        Safe
91 .TE
93 .SH SEE ALSO
94 .LP
95 \fBdoor_call\fR(3C), \fBattributes\fR(5)