xref: /NextBSD/sys/sys/mach/host.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/06/24  18:05:04  jeffreyh
27  * 	Added host_paging_self field to host structure
28  * 	[92/06/17            jeffreyh]
29  *
30  * Revision 2.4  91/05/14  16:41:25  mrt
31  * 	Correcting copyright
32  *
33  * Revision 2.3  91/02/05  17:26:20  mrt
34  * 	Changed to new Mach copyright
35  * 	[91/02/01  16:12:24  mrt]
36  *
37  * Revision 2.2  90/06/02  14:53:53  rpd
38  * 	Created for new host/processor technology.
39  * 	[90/03/26  23:50:40  rpd]
40  *
41  * 	Cleanup changes.
42  * 	[89/08/02            dlb]
43  * 	extern realhost declaration.
44  * 	[89/02/03            dlb]
45  *
46  * Revision 2.3  89/10/15  02:04:17  rpd
47  * 	Minor cleanups.
48  *
49  * Revision 2.2  89/10/11  14:05:08  dlb
50  * 	Cleanup.
51  * 	[89/08/02            dlb]
52  *
53  */
54 /* CMU_ENDHIST */
55 /*
56  * Mach Operating System
57  * Copyright (c) 1991,1990,1989,1988 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 /*
84  *	kern/host.h
85  *
86  *	Definitions for host data structures.
87  *
88  */
89 
90 #ifndef	_KERN_HOST_H_
91 #define _KERN_HOST_H_
92 #include <sys/mach/host_special_ports.h>
93 
94 struct	host {
95 	struct mtx lock;
96 	ipc_port_t special[HOST_MAX_SPECIAL_PORT + 1];
97 	struct exception_action exc_actions[EXC_TYPES_COUNT];
98 	struct ipc_port *host_self;
99 	struct ipc_port *host_priv_self;
100 	struct ipc_port *host_security_self;
101 };
102 
103 #define host_lock(host)		mtx_lock(&(host)->lock)
104 #define host_unlock(host)	mtx_unlock(&(host)->lock)
105 
106 
107 typedef struct host	host_data_t;
108 
109 #define HOST_NULL	((host_t)0)
110 
111 extern host_data_t	realhost;
112 
113 #endif	/* _KERN_HOST_H_ */
114