4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
36 * door() system calls -- executed by subject process
40 pr_door_info(struct ps_prochandle
*Pr
, int did
, door_info_t
*di
)
42 sysret_t rval
; /* return value from door_info() */
43 argdes_t argd
[6]; /* arg descriptors for door_info() */
44 argdes_t
*adp
= &argd
[0]; /* first argument */
47 if (Pr
== NULL
) /* no subject process */
48 return (door_info(did
, di
));
51 adp
->arg_object
= NULL
;
52 adp
->arg_type
= AT_BYVAL
;
53 adp
->arg_inout
= AI_INPUT
;
55 adp
++; /* move to door_info_t argument */
59 adp
->arg_type
= AT_BYREF
;
60 adp
->arg_inout
= AI_OUTPUT
;
61 adp
->arg_size
= sizeof (door_info_t
);
62 adp
++; /* move to unused argument */
65 adp
->arg_object
= NULL
;
66 adp
->arg_type
= AT_BYVAL
;
67 adp
->arg_inout
= AI_INPUT
;
69 adp
++; /* move to unused argument */
72 adp
->arg_object
= NULL
;
73 adp
->arg_type
= AT_BYVAL
;
74 adp
->arg_inout
= AI_INPUT
;
76 adp
++; /* move to unused argument */
79 adp
->arg_object
= NULL
;
80 adp
->arg_type
= AT_BYVAL
;
81 adp
->arg_inout
= AI_INPUT
;
83 adp
++; /* move to subcode argument */
85 adp
->arg_value
= DOOR_INFO
;
86 adp
->arg_object
= NULL
;
87 adp
->arg_type
= AT_BYVAL
;
88 adp
->arg_inout
= AI_INPUT
;
91 error
= Psyscall(Pr
, &rval
, SYS_door
, 6, &argd
[0]);
94 errno
= (error
< 0)? ENOSYS
: error
;