home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / mach / mach_types.defs < prev    next >
Text File  |  1991-05-28  |  5KB  |  197 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1989 Carnegie-Mellon University
  4.  * Copyright (c) 1988 Carnegie-Mellon University
  5.  * All rights reserved.  The CMU software License Agreement specifies
  6.  * the terms and conditions for use and redistribution.
  7.  */
  8. /*
  9.  * HISTORY
  10.  * $Log:    mach_types.defs,v $
  11.  * Revision 2.11  90/07/20  08:48:54  mrt
  12.  *     Add processor_set_name_array_t to replace processor_set_array_t.
  13.  *     [90/07/13            dlb]
  14.  *
  15.  * Revision 2.9  89/10/11  14:39:01  dlb
  16.  *     Add!2`ew more array type definitions.
  17.  *     [89/06/08            dlb]
  18.  * 
  19.  *     Add host and processor type definitions.
  20.  *     [89/01/25            dlb]
  21.  * 
  22.  * Revision 2.8  89/10/10  10:55:42  mwyoung
  23.  *     Use vm_object_lookup directly as the in-translation for
  24.  *     the memory_object type.  At some point, the memory_object
  25.  *     interface should use destructors.
  26.  *     [89/10/04            mwyoung]
  27.  * 
  28.  * Revision 2.7  89/07/14  15:26:33  rvb
  29.  *     Fixed long-standing erroneous size for machine_slot_data_t.
  30.  *     Only a new mig and a picky guy (me) would notice.
  31.  *     [89/07/12            af]
  32.  * 
  33.  * Revision 2.6  89/05/21  23:12:10  mrt
  34.  *     Added a simport of kern/type_conversion.h  under a KERNEL_SERVER
  35.  *     conditional.
  36.  *     [89/05/21            mrt]
  37.  * 
  38.  * Revision 2.5  89/04/08  23:40:32  rpd
  39.  *     Use new-fangled syntax for translation/destructor functions.
  40.  *     Define internal_memory_pointer_t.
  41.  *     [89/04/08  22:55:37  rpd]
  42.  * 
  43.  * Revision 2.4  89/03/09  20:20:52  rpd
  44.  *     More cleanup.
  45.  * 
  46.  * Revision 2.3  89/02/25  18:37:59  gm0w
  47.  *     Changes for cleanup.
  48.  * 
  49.  * Revision 2.6  89/01/12  07:57:37  rpd
  50.  *     Moved standard stuff to std_types.defs.  Moved debugging definitions
  51.  *     like ipc_statistics_t out to other files.
  52.  *     [89/01/12  04:50:24  rpd]
  53.  * 
  54.  * Revision 2.5  89/01/04  13:37:11  rpd
  55.  *     Increased size of fpa_counters_t.
  56.  *     [89/01/03  16:46:38  rpd]
  57.  *     
  58.  *     Added fpa_counters_t type.
  59.  *     [89/01/01  15:03:09  rpd]
  60.  * 
  61.  * Revision 2.4  88/09/25  22:15:16  rpd
  62.  *     Bumped size of callout_statistics_t to account for the
  63.  *     new field, cos_num_untimeout_hit.
  64.  *     [88/09/09  23:14:38  rpd]
  65.  *     
  66.  *     Fixed log.  Changed includes to the new style.
  67.  *     Added definitions of callout_info_t,
  68.  *     callout_info_array_t, callout_statistics_t.
  69.  *     [88/09/09  04:46:31  rpd]
  70.  * 
  71.  */
  72. /*
  73.  *    Mach kernel interface type declarations
  74.  */
  75.  
  76. #ifndef    _MACH_MACH_TYPES_DEFS_
  77. #define _MACH_MACH_TYPES_DEFS_
  78.  
  79. #include <mach/std_types.defs>
  80.  
  81. #if    KERNEL_SERVER
  82. simport <kern/type_conversion.h>;
  83. #endif    KERNEL_SERVER
  84.  
  85. type task_t = port_t
  86. #if    KERNEL_SERVER
  87.         intran: task_t convert_port_to_task(port_t)
  88.         outtran: port_t convert_task_to_port(task_t)
  89.         destructor: task_deallocate(task_t)
  90. #endif    KERNEL_SERVER
  91.         ;
  92.  
  93.  
  94. type thread_t = port_t
  95. #if    KERNEL_SERVER
  96.         intran: thread_t convert_port_to_thread(port_t)
  97.         outtran: port_t convert_thread_to_port(thread_t)
  98.         destructor!2aread_deallocate(thread_t)
  99. #endif    KERNEL_SERVER
  100.         ;
  101.  
  102. type thread_state_t        = array[*:1024] of int;
  103.  
  104. /*
  105.  * Mig doesn't handle translations of the components of an array,
  106.  * so use port_t instead of thread_t.
  107.  */
  108. type task_array_t = ^array[] of port_t;
  109. type thread_array_t = ^array[] of port_t;
  110.  
  111. type vm_task_t = port_t
  112. #if    KERNEL_SERVER
  113.         intran: vm_map_t convert_port_to_map(port_t)
  114.         destructor: vm_map_deallocate(vm_map_t)
  115. #endif    KERNEL_SERVER
  116.         ;
  117.  
  118. type vm_address_t = int;
  119. type vm_offset_t = int;
  120. type vm_size_t = int;
  121. type vm_prot_t = int;
  122. type vm_inherit_t = int;
  123. type vm_statistics_data_t = struct[13] of int;
  124.  
  125. type thread_info_t        = array[*:1024] of int;
  126. type task_info_t        = array[*:1024] of int;
  127.  
  128. type memory_object_t = port_t;
  129. type memory_object_control_t = port_t
  130. #if    KERNEL_SERVER
  131.         intran: vm_object_t vm_object_lookup(port_t)
  132.         outtran: port_t NEVER_HAPPENS(vm_object_t)
  133. #endif    KERNEL_SERVER
  134.         ;
  135. type memory_object_name_t = port_t;
  136.  
  137. type memory_object_copy_strategy_t = int;
  138.  
  139. type internal_memory_pointer_t =
  140.     ^array [] of MSG_TYPE_INTERNAL_MEMORY|MSG_TYPE_BYTE
  141.     ctype: pointer_t;
  142.  
  143. type machine_info_data_t = struct[5] of int;
  144. type machine_slot_data_t = struct[8] of int;
  145.  
  146. type vm_page_data_t = array[4096] of MSG_TYPE_BYTE;
  147.  
  148. type network_port_t = struct[6] of int;
  149.  
  150.  
  151. type host_t = port_t
  152. #if    KERNEL_SERVER
  153.         intran: host_t convert_port_to_host(port_t)
  154.         outtran: port_t convert_host_to_port(host_t)
  155. #endif    KERNEL_SERVER
  156.         ;
  157. type host_priv_t = port_t
  158. #if    KERNEL_SERVER
  159.         intran: host_t convert_port_to_host_priv(port_t)
  160. #endif    KERNEL_SERVER
  161.         ;
  162. type host_info_t             = array[*:1024] of int;
  163.  
  164. type processor_t = port_t
  165. #if    KERNEL_SERVER
  166.         intran: processor_t convert_port_to_processor(port_t)
  167.         outtran: port_t convert_processor_to_port(processor_t)
  168. #endif    KERNEL_SERVER
  169.         ;
  170. type processor_array_t         = ^array[] of port_t;
  171. type processor_info_t        = array[*:1024] of int;
  172.  
  173. type processor_set_t = port_t
  174. #if    KERNEL_SERVER
  175.         intran: processor_set_t convert_port_to_pset(port_t)
  176.         outtran: port_t convert_pset_to_port(processor_set_t)
  177.         destructor: pset_deallocate(processor_set_t)
  178. #endif    KERNEL_SERVER
  179.         ;
  180.  
  181. type processor_set_name_t = port_t
  182. #if    KERNEL_SERVER
  183.         intran: processor_set_t convert_port_to_pset_name(port_t)
  184.         outtran: port_t convert_pset_name_to_port(processor_set_t)
  185.         destructor: pset_deallocate(processor_set_t)
  186. #endif    KERNEL_SERV!2b    ;
  187.  
  188. type processor_set_name_array_t = ^array[] of port_t;
  189.  
  190. type processor_set_info_t    = array[*:1024] of int;    
  191.  
  192. type kernel_version_t        = (MSG_TYPE_STRING, 512*8);
  193.  
  194. import <mach/mach_types.h>;
  195.  
  196. #endif    _MACH_MACH_TYPES_DEFS_
  197.