No empty .Rs/.Re
[netbsd-mini2440.git] / sys / compat / mach / mach_host.h
blob79e6e29f4d58a9262e6f9af889706dcc3833af9f
1 /* $NetBSD: mach_host.h,v 1.16 2005/12/11 12:20:20 christos Exp $ */
3 /*-
4 * Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Emmanuel Dreyfus
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef _MACH_HOST_H_
33 #define _MACH_HOST_H_
35 #include <sys/types.h>
36 #include <sys/param.h>
37 #include <sys/signal.h>
38 #include <sys/proc.h>
40 #include <compat/mach/mach_types.h>
41 #include <compat/mach/mach_message.h>
43 /* host_info */
45 typedef mach_integer_t mach_host_flavor_t;
47 typedef struct {
48 mach_msg_header_t req_msgh;
49 mach_ndr_record_t req_ndr;
50 mach_host_flavor_t req_flavor;
51 mach_msg_type_number_t req_count;
52 } mach_host_info_request_t;
54 typedef struct {
55 mach_msg_header_t rep_msgh;
56 mach_ndr_record_t rep_ndr;
57 mach_kern_return_t rep_retval;
58 mach_msg_type_number_t rep_count;
59 mach_integer_t rep_data[12];
60 mach_msg_trailer_t rep_trailer;
61 } mach_host_info_reply_t;
63 typedef struct {
64 mach_msg_header_t rep_msgh;
65 mach_ndr_record_t rep_ndr;
66 mach_kern_return_t rep_retval;
67 mach_msg_type_number_t rep_count;
68 mach_msg_trailer_t rep_trailer;
69 } mach_host_info_reply_simple_t;
71 #define MACH_HOST_BASIC_INFO 1
72 #define MACH_HOST_SCHED_INFO 3
73 #define MACH_HOST_RESOURCE_SIZES 4
74 #define MACH_HOST_PRIORITY_INFO 5
75 #define MACH_HOST_SEMAPHORE_TRAPS 7
76 #define MACH_HOST_MACH_MSG_TRAP 8
78 struct mach_host_basic_info {
79 mach_integer_t max_cpus;
80 mach_integer_t avail_cpus;
81 mach_vm_size_t memory_size;
82 mach_cpu_type_t cpu_type;
83 mach_cpu_subtype_t cpu_subtype;
86 struct mach_host_sched_info {
87 mach_integer_t min_timeout;
88 mach_integer_t min_quantum;
91 struct mach_kernel_resource_sizes {
92 mach_vm_size_t task;
93 mach_vm_size_t thread;
94 mach_vm_size_t port;
95 mach_vm_size_t memory_region;
96 mach_vm_size_t memory_object;
99 struct mach_host_priority_info {
100 mach_integer_t kernel_priority;
101 mach_integer_t system_priority;
102 mach_integer_t server_priority;
103 mach_integer_t user_priority;
104 mach_integer_t depress_priority;
105 mach_integer_t idle_priority;
106 mach_integer_t minimum_priority;
107 mach_integer_t maximum_priority;
110 /* host_page_size */
112 typedef struct {
113 mach_msg_header_t req_msgh;
114 } mach_host_page_size_request_t;
116 typedef struct {
117 mach_msg_header_t rep_msgh;
118 mach_ndr_record_t rep_ndr;
119 mach_kern_return_t rep_retval;
120 mach_vm_size_t rep_page_size;
121 mach_msg_trailer_t rep_trailer;
122 } mach_host_page_size_reply_t;
124 /* host_get_clock_service */
126 typedef struct {
127 mach_msg_header_t req_msgh;
128 mach_ndr_record_t req_ndr;
129 mach_clock_id_t req_clock_id;
130 } mach_host_get_clock_service_request_t;
132 typedef struct {
133 mach_msg_header_t rep_msgh;
134 mach_msg_body_t rep_body;
135 mach_msg_port_descriptor_t rep_clock_serv;
136 mach_msg_trailer_t rep_trailer;
137 } mach_host_get_clock_service_reply_t;
139 /* host_get_io_master */
141 typedef struct {
142 mach_msg_header_t req_msgh;
143 } mach_host_get_io_master_request_t;
145 typedef struct {
146 mach_msg_header_t rep_msgh;
147 mach_msg_body_t rep_body;
148 mach_msg_port_descriptor_t rep_iomaster;
149 mach_msg_trailer_t rep_trailer;
150 } mach_host_get_io_master_reply_t;
152 /* processor_set_default */
154 typedef struct {
155 mach_msg_header_t req_msgh;
156 } mach_processor_set_default_request_t;
158 typedef struct {
159 mach_msg_header_t rep_msgh;
160 mach_msg_body_t rep_body;
161 mach_msg_port_descriptor_t rep_defaultset;
162 mach_msg_trailer_t rep_trailer;
163 } mach_processor_set_default_reply_t;
165 /* host_processor_set_priv */
167 typedef struct {
168 mach_msg_header_t req_msgh;
169 mach_msg_body_t req_body;
170 mach_msg_port_descriptor_t req_set;
171 } mach_host_processor_set_priv_request_t;
173 typedef struct {
174 mach_msg_header_t rep_msgh;
175 mach_msg_body_t rep_body;
176 mach_msg_port_descriptor_t rep_ctlset;
177 mach_msg_trailer_t rep_trailer;
178 } mach_host_processor_set_priv_reply_t;
180 /* These are machine dependent functions */
181 void mach_host_basic_info(struct mach_host_basic_info *);
182 void mach_host_priority_info(struct mach_host_priority_info *);
184 #endif /* _MACH_HOST_H_ */