The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/compat/mach/mach_host.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: mach_host.h,v 1.15 2005/02/26 23:10:19 perry Exp $ */
    2 
    3 /*-
    4  * Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
    5  * All rights reserved.
    6  *
    7  * This code is derived from software contributed to The NetBSD Foundation
    8  * by Emmanuel Dreyfus
    9  *
   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.
   18  * 3. All advertising materials mentioning features or use of this software
   19  *    must display the following acknowledgement:
   20  *        This product includes software developed by the NetBSD
   21  *        Foundation, Inc. and its contributors.
   22  * 4. Neither the name of The NetBSD Foundation nor the names of its
   23  *    contributors may be used to endorse or promote products derived
   24  *    from this software without specific prior written permission.
   25  *
   26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   30  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   36  * POSSIBILITY OF SUCH DAMAGE.
   37  */
   38 
   39 #ifndef _MACH_HOST_H_
   40 #define _MACH_HOST_H_
   41 
   42 #include <sys/types.h>
   43 #include <sys/param.h>
   44 #include <sys/signal.h>
   45 #include <sys/proc.h>
   46 
   47 #include <compat/mach/mach_types.h>
   48 #include <compat/mach/mach_message.h>
   49 
   50 /* host_info */
   51 
   52 typedef mach_integer_t mach_host_flavor_t;
   53 
   54 typedef struct {
   55         mach_msg_header_t req_msgh;
   56         mach_ndr_record_t req_ndr;
   57         mach_host_flavor_t req_flavor;
   58         mach_msg_type_number_t req_count;
   59 } mach_host_info_request_t;
   60 
   61 typedef struct {
   62         mach_msg_header_t rep_msgh;
   63         mach_ndr_record_t rep_ndr;
   64         mach_kern_return_t rep_retval;
   65         mach_msg_type_number_t rep_count;
   66         mach_integer_t rep_data[12];
   67         mach_msg_trailer_t rep_trailer;
   68 } mach_host_info_reply_t;
   69 
   70 typedef struct {
   71         mach_msg_header_t rep_msgh;
   72         mach_ndr_record_t rep_ndr;
   73         mach_kern_return_t rep_retval;
   74         mach_msg_type_number_t rep_count;
   75         mach_msg_trailer_t rep_trailer;
   76 } mach_host_info_reply_simple_t;
   77 
   78 #define MACH_HOST_BASIC_INFO            1
   79 #define MACH_HOST_SCHED_INFO            3
   80 #define MACH_HOST_RESOURCE_SIZES        4
   81 #define MACH_HOST_PRIORITY_INFO         5
   82 #define MACH_HOST_SEMAPHORE_TRAPS       7
   83 #define MACH_HOST_MACH_MSG_TRAP         8
   84 
   85 struct mach_host_basic_info {
   86         mach_integer_t          max_cpus;
   87         mach_integer_t          avail_cpus;
   88         mach_vm_size_t          memory_size;
   89         mach_cpu_type_t         cpu_type;
   90         mach_cpu_subtype_t      cpu_subtype;
   91 };
   92 
   93 struct mach_host_sched_info {
   94         mach_integer_t          min_timeout;
   95         mach_integer_t          min_quantum;
   96 };
   97 
   98 struct mach_kernel_resource_sizes {
   99         mach_vm_size_t   task;
  100         mach_vm_size_t   thread;
  101         mach_vm_size_t   port;
  102         mach_vm_size_t   memory_region;
  103         mach_vm_size_t   memory_object;
  104 };
  105 
  106 struct mach_host_priority_info {
  107         mach_integer_t  kernel_priority;
  108         mach_integer_t  system_priority;
  109         mach_integer_t  server_priority;
  110         mach_integer_t  user_priority;
  111         mach_integer_t  depress_priority;
  112         mach_integer_t  idle_priority;
  113         mach_integer_t  minimum_priority;
  114         mach_integer_t  maximum_priority;
  115 };
  116 
  117 /* host_page_size */
  118 
  119 typedef struct {
  120         mach_msg_header_t req_msgh;
  121 } mach_host_page_size_request_t;
  122 
  123 typedef struct {
  124         mach_msg_header_t rep_msgh;
  125         mach_ndr_record_t rep_ndr;
  126         mach_kern_return_t rep_retval;
  127         mach_vm_size_t rep_page_size;
  128         mach_msg_trailer_t rep_trailer;
  129 } mach_host_page_size_reply_t;
  130 
  131 /* host_get_clock_service */
  132 
  133 typedef struct {
  134         mach_msg_header_t req_msgh;
  135         mach_ndr_record_t req_ndr;
  136         mach_clock_id_t req_clock_id;
  137 } mach_host_get_clock_service_request_t;
  138 
  139 typedef struct {
  140         mach_msg_header_t rep_msgh;
  141         mach_msg_body_t rep_body;
  142         mach_msg_port_descriptor_t rep_clock_serv;
  143         mach_msg_trailer_t rep_trailer;
  144 } mach_host_get_clock_service_reply_t;
  145 
  146 /* host_get_io_master */
  147 
  148 typedef struct {
  149         mach_msg_header_t req_msgh;
  150 } mach_host_get_io_master_request_t;
  151 
  152 typedef struct {
  153         mach_msg_header_t rep_msgh;
  154         mach_msg_body_t rep_body;
  155         mach_msg_port_descriptor_t rep_iomaster;
  156         mach_msg_trailer_t rep_trailer;
  157 } mach_host_get_io_master_reply_t;
  158 
  159 /* processor_set_default */
  160 
  161 typedef struct {
  162         mach_msg_header_t req_msgh;
  163 } mach_processor_set_default_request_t;
  164 
  165 typedef struct {
  166         mach_msg_header_t rep_msgh;
  167         mach_msg_body_t rep_body;
  168         mach_msg_port_descriptor_t rep_defaultset;
  169         mach_msg_trailer_t rep_trailer;
  170 } mach_processor_set_default_reply_t;
  171 
  172 /* host_processor_set_priv */
  173 
  174 typedef struct {
  175         mach_msg_header_t req_msgh;
  176         mach_msg_body_t req_body;
  177         mach_msg_port_descriptor_t req_set;
  178 } mach_host_processor_set_priv_request_t;
  179 
  180 typedef struct {
  181         mach_msg_header_t rep_msgh;
  182         mach_msg_body_t rep_body;
  183         mach_msg_port_descriptor_t rep_ctlset;
  184          mach_msg_trailer_t rep_trailer;
  185 } mach_host_processor_set_priv_reply_t;
  186 
  187 /* These are machine dependent functions */
  188 void mach_host_basic_info(struct mach_host_basic_info *);
  189 void mach_host_priority_info(struct mach_host_priority_info *);
  190 
  191 #endif /* _MACH_HOST_H_ */

Cache object: 39d00d23deea3086efd014fc618ee2a7


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.