xref: /NextBSD/sys/sys/mach/task_special_ports.h (revision 33da5adc555b3bc29986eeadca03829e4ad06b1e)
1 /*
2  * Copyright 1991-1998 by Open Software Foundation, Inc.
3  *              All Rights Reserved
4  *
5  * Permission to use, copy, modify, and distribute this software and
6  * its documentation for any purpose and without fee is hereby granted,
7  * provided that the above copyright notice appears in all copies and
8  * that both the copyright notice and this permission notice appear in
9  * supporting documentation.
10  *
11  * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
12  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
13  * FOR A PARTICULAR PURPOSE.
14  *
15  * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
16  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17  * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
18  * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
19  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20  */
21 /*
22  * MkLinux
23  */
24 /* CMU_HIST */
25 /*
26  * Revision 2.4.2.1  92/03/03  16:22:36  jeffreyh
27  * 	Changes from TRUNK
28  * 	[92/02/26  12:20:27  jeffreyh]
29  *
30  * Revision 2.5  92/01/15  13:44:54  rpd
31  * 	Changed MACH_IPC_COMPAT conditionals to default to not present.
32  *
33  * Revision 2.4  91/05/14  17:00:57  mrt
34  * 	Correcting copyright
35  *
36  * Revision 2.3  91/02/05  17:36:29  mrt
37  * 	Changed to new Mach copyright
38  * 	[91/02/01  17:21:29  mrt]
39  *
40  * Revision 2.2  90/06/02  15:00:03  rpd
41  * 	Converted to new IPC.
42  * 	[90/03/26  22:40:08  rpd]
43  *
44  * Revision 2.1  89/08/03  16:06:01  rwd
45  * Created.
46  *
47  * Revision 2.3  89/02/25  18:41:12  gm0w
48  * 	Changes for cleanup.
49  *
50  * 17-Jan-88  David Golub (dbg) at Carnegie-Mellon University
51  *	Created.
52  *
53  */
54 /* CMU_ENDHIST */
55 /*
56  * Mach Operating System
57  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
58  * All Rights Reserved.
59  *
60  * Permission to use, copy, modify and distribute this software and its
61  * documentation is hereby granted, provided that both the copyright
62  * notice and this permission notice appear in all copies of the
63  * software, derivative works or modified versions, and any portions
64  * thereof, and that both notices appear in supporting documentation.
65  *
66  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
67  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
68  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
69  *
70  * Carnegie Mellon requests users of this software to return to
71  *
72  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
73  *  School of Computer Science
74  *  Carnegie Mellon University
75  *  Pittsburgh PA 15213-3890
76  *
77  * any improvements or extensions that they make and grant Carnegie Mellon
78  * the rights to redistribute these changes.
79  */
80 /*
81  */
82 /*
83  *	File:	mach/task_special_ports.h
84  *
85  *	Defines codes for special_purpose task ports.  These are NOT
86  *	port identifiers - they are only used for the task_get_special_port
87  *	and task_set_special_port routines.
88  *
89  */
90 
91 #ifndef	_MACH_TASK_SPECIAL_PORTS_H_
92 #define _MACH_TASK_SPECIAL_PORTS_H_
93 
94 typedef	int	task_special_port_t;
95 
96 #define TASK_KERNEL_PORT	1	/* Represents task to the outside
97 					   world.*/
98 
99 #define TASK_HOST_PORT		2	/* The host (priv) port for task.  */
100 
101 #define TASK_NAME_PORT		3	/* the name (unpriv) port for task */
102 
103 #define TASK_BOOTSTRAP_PORT	4	/* Bootstrap environment for task. */
104 
105 #define TASK_WIRED_LEDGER_PORT	5	/* Wired resource ledger for task. */
106 
107 #define TASK_PAGED_LEDGER_PORT	6	/* Paged resource ledger for task. */
108 
109 #define TASK_SEATBELT_PORT	7	/* Seatbelt compiler/DEM port for task. */
110 
111 /* PORT 8 was the GSSD TASK PORT which transformed to a host port */
112 
113 #define TASK_ACCESS_PORT	9	/* Permission check for task_for_pid. */
114 
115 #define TASK_DEBUG_CONTROL_PORT 10 /* debug control port */
116 
117 /*
118  *	Definitions for ease of use
119  */
120 
121 #define task_get_kernel_port(task, port)	\
122 		(task_get_special_port((task), TASK_KERNEL_PORT, (port)))
123 
124 #define task_set_kernel_port(task, port)	\
125 		(task_set_special_port((task), TASK_KERNEL_PORT, (port)))
126 
127 #define task_get_host_port(task, port)		\
128 		(task_get_special_port((task), TASK_HOST_PORT, (port)))
129 
130 #define task_set_host_port(task, port)	\
131 		(task_set_special_port((task), TASK_HOST_PORT, (port)))
132 
133 #define task_get_bootstrap_port(task, port)	\
134 		(task_get_special_port((task), TASK_BOOTSTRAP_PORT, (port)))
135 
136 #define task_set_bootstrap_port(task, port)	\
137 		(task_set_special_port((task), TASK_BOOTSTRAP_PORT, (port)))
138 
139 #define task_get_task_access_port(task, port)	\
140 		(task_get_special_port((task), TASK_ACCESS_PORT, (port)))
141 
142 #define task_set_task_access_port(task, port)	\
143 		(task_set_special_port((task), TASK_ACCESS_PORT, (port)))
144 
145 
146 #endif	/* _MACH_TASK_SPECIAL_PORTS_H_ */
147