home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / mach / mach_host.defs < prev    next >
Text File  |  1991-11-11  |  7KB  |  329 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1989 Carnegie-Mellon University
  4.  * All rights reserved.  The CMU software License Agreement specifies
  5.  * the terms and conditions for use and redistribution.
  6.  */
  7. /*
  8.  * HISTORY
  9.  * $Log:    mach_host.defs,v $
  10.  * Revision 2.5  90/07/20  08:48:47  mrt
  11.  *     Delete thread_depress_abort.  Subsumed by thread_abort.
  12.  *     [90/07/16            dlb]
  13.  *     Convert host_processor_sets to non-privileged form: return name
  14.  *     ports given host port instead of returning control ports given
  15.  *     privileged host port.
  16.  *     [90/07/13            dlb]
  17.  * 
  18.  * Revision 2.4  89/12/22  15:54:26  rpd
  19.  *     Under KERNEL_SERVER, pass the out arguments of
  20.  *     processor_set_create as port_t's.  They really are
  21.  *     the appropriate processor set types, but processor_set_create
  22.  *     does the type conversions internally.  This isn't pretty.
  23.  *     [89/12/15            dlb]
  24.  * 
  25.  * Revision 2.3  89/10/15  02:05:40  rpd
  26.  *     Minor cleanups.
  27.  * 
  28.  * Revision 2.2  89/10/11  14:38:34  dlb
  29.  *     Add IsLong specifiers to variable length arguments to info calls.
  30.  *     Add thread_depress_abort.
  31.  *     Add processor_set_{tasks,threads}, host_processor_sets,
  32.  *            host_processor_set_priv.
  33.  *     Add priority and policy calls.
  34.  *     Split processor_set_default.  Add task_assign_default and
  35.  *            thread_assign_default.
  36.  *     Add host_kernel_version.
  37.  * 
  38.  * Revision 2.1.1.3  89/08/02  23:58:37  dlb
  39.  *     Remove KERNEL_SERVER define.  Cleanup.
  40.  *     [89/08/02            dlb]
  41.  * 
  42.  * Revision 2.1.1.2  89/08/02  23:10:06  dlb
  43.  *     Add IsLong specifiers to variable length arguments to info calls.
  44.  *     [89/08/02            dlb]
  45.  * 
  46.  * Rev!2Wn 2.1.1.1  89/07/25  17:05:31  dlb
  47.  *     Add thread_depress_abort.
  48.  *     [89/06/20            dlb]
  49.  * 
  50.  *     Add processor_set_{tasks,threads}, host_processor_sets,
  51.  *     host_processor_set_priv.
  52.  *     [89/06/08            dlb]
  53.  * 
  54.  *     Add priority and policy calls.
  55.  *     [89/05/12            dlb]
  56.  * 
  57.  *     Move type definitions to mach_types.defs, delete kernel keyword.
  58.  *     [89/01/25            dlb]
  59.  * 
  60.  *     Split processor_set_default.  Add task_assign_default and
  61.  *     thread_assign_default.
  62.  *     [88/12/21            dlb]
  63.  * 
  64.  *     Minor cleanups, add host_kernel_version.
  65.  *     [88/12/02            dlb]
  66.  * 
  67.  * Revision 2.1  89/01/30  16:17:06  dlb
  68.  * Created.
  69.  * 
  70.  */
  71.  
  72. /*
  73.  * File:    mach/mach_host.defs
  74.  *
  75.  * Abstract:
  76.  *    Mach host operations support.  Includes processor allocation and
  77.  *    control.  
  78.  */
  79.  
  80. subsystem mach_host 2600;
  81.  
  82. /*
  83.  *    Basic types
  84.  */
  85.  
  86. #include <mach/std_types.defs>
  87. #include <mach/mach_types.defs>
  88.  
  89. /*
  90.  *    Get list of processors on this host.
  91.  */
  92.  
  93. routine host_processors(
  94.         host_priv    : host_priv_t;
  95.     out    processor_list    : processor_array_t);
  96.  
  97. /*
  98.  *    Return information about this host.
  99.  */
  100.  
  101. routine host_info(
  102.         host        : host_t;
  103.         flavor        : int;
  104.     out    host_info_out    : host_info_t, IsLong);
  105.  
  106.  
  107. /*
  108.  *    Return information about this processor.
  109.  */
  110. routine processor_info(
  111.         processor    : processor_t;
  112.         flavor        : int;
  113.     out    host        : host_t;
  114.     out    processor_info_out: processor_info_t, IsLong);
  115.  
  116. /*
  117.  *    Start processor.
  118.  */
  119.  
  120. routine    processor_start(
  121.         processor    : processor_t);
  122.  
  123. /*
  124.  *    Exit processor -- may not be restartable.
  125.  */
  126.  
  127. routine    processor_exit(
  128.         processor    : processor_t);
  129.  
  130. /*
  131.  *    Do something machine-dependent to processor.
  132.  */
  133. routine processor_control(
  134.         processor    : processor_t;
  135.         processor_cmd    : processor_info_t, IsLong);
  136.  
  137. /*
  138.  *    Get default processor set for host.
  139.  */
  140. routine processor_set_default(
  141.         host        : host_t;
  142.     out    default_set    : processor_set_name_t);
  143.  
  144. #ifndef    NeXT
  145. /*
  146.  *    Get rights to default processor set for host.
  147.  *    Replaced by host_processor_set_priv.
  148.  */
  149. routine xxx_processor_set_default_priv(
  150.         host        : host_priv_t;
  151.     out    default_set    : processor_set_t);
  152. #endif    NeXT
  153.  
  154. /*
  155.  *    Create new processor set.  Returns real port for manipulations,
  156.  *    and name port for obtaining information.
  157.  */
  158. routine processor_set_create(
  159.         host        : host_t;
  160. #if    KERNEL_SERVER
  161.     out    new_set        : port_t;
  162.     out    new_name    : port_t);
  163. #else    KERNEL_SERVER
  164.     ou!2Xw_set        : processor_set_t;
  165.     out    new_name    : processor_set_name_t);
  166. #endif    KERNEL_SERVER
  167.  
  168. /*
  169.  *    Destroy processor set.
  170.  */
  171. routine processor_set_destroy(
  172.         set        : processor_set_t);
  173.  
  174. /*
  175.  *    Get information about processor set.
  176.  */
  177. routine processor_set_info(
  178.         set_name    : processor_set_name_t;
  179.         flavor        : int;
  180.     out    host        : host_t;
  181.     out    info_out    : processor_set_info_t, IsLong);
  182.  
  183. /*
  184.  *    Assign processor to processor set.
  185.  */
  186. routine processor_assign(
  187.         processor    : processor_t;
  188.         new_set        : processor_set_t;
  189.         wait        : boolean_t);
  190.  
  191. /*
  192.  *    Get current assignment for processor.
  193.  */
  194.  
  195. routine processor_get_assignment(
  196.         processor    : processor_t;
  197.     out    assigned_set    : processor_set_name_t);
  198.  
  199. /*
  200.  *    Assign thread to processor set.
  201.  */
  202. routine    thread_assign(
  203.         thread        : thread_t;
  204.         new_set        : processor_set_t);
  205.  
  206. /*
  207.  *    Assign thread to default set.
  208.  */
  209. routine thread_assign_default(
  210.         thread        : thread_t);
  211.  
  212. /*
  213.  *    Get current assignment for thread.
  214.  */
  215. routine thread_get_assignment(
  216.         thread        : thread_t;
  217.     out    assigned_set    : processor_set_name_t);
  218.  
  219. /*
  220.  *    Assign task to processor set.
  221.  */
  222. routine task_assign(
  223.         task        : task_t;
  224.         new_set        : processor_set_t;
  225.         assign_threads    : boolean_t);
  226. /*
  227.  *    Assign task to default set.
  228.  */
  229. routine task_assign_default(
  230.         task        : task_t;
  231.         assign_threads    : boolean_t);
  232.  
  233. /*
  234.  *    Get current assignment for task.
  235.  */
  236. routine task_get_assignment(
  237.         task        : task_t;
  238.     out    assigned_set    : processor_set_name_t);
  239.  
  240. /*
  241.  *    Get string describing current kernel version.
  242.  */
  243. routine    host_kernel_version(
  244.         host        : host_t;
  245.     out    kernel_version    : kernel_version_t);
  246.  
  247. /*
  248.  *    Set priority for thread.
  249.  */
  250. routine thread_priority(
  251.         thread        : thread_t;
  252.         priority    : int;
  253.         set_max        : boolean_t);
  254.  
  255. /*
  256.  *    Set max priority for thread.
  257.  */
  258. routine thread_max_priority(
  259.         thread        : thread_t;
  260.         processor_set    : processor_set_t;
  261.         max_priority    : int);
  262.  
  263. /*
  264.  *    Set task priority.
  265.  */
  266. routine task_priority(
  267.         task        : task_t;
  268.         priority    : int;
  269.         change_threads    : boolean_t);
  270.  
  271. /*
  272.  *    Set max priority for processor_set.
  273.  */
  274. routine processor_set_max_priority(
  275.         processor_set    : processor_set_t;
  276.         max_priority    : int;
  277.         change_threads    : boolean_t);
  278.  
  279. /*
  280.  *    Set policy for thread
  281.  */
  282. routine thread_policy(
  283.         thread        : thread_t;
  284.         policy        : int;
  285.         data        : int);
  286.  
  287. /*
  288.  *    Enable policy for processor set
  289.  */
  290. routine processor_set_policy_enable(
  291.         processor_set    : pr!2Ysor_set_t;
  292.         policy        : int);
  293.  
  294. /*
  295.  *    Disable policy for processor set
  296.  */
  297. routine processor_set_policy_disable(
  298.         processor_set    : processor_set_t;
  299.         policy        : int;
  300.         change_threads    : boolean_t);
  301. /*
  302.  *    List all tasks in processor set.
  303.  */
  304. routine processor_set_tasks(
  305.         processor_set    : processor_set_t;
  306.     out    task_list    : task_array_t);
  307.  
  308. /*
  309.  *    List all threads in processor set.
  310.  */
  311. routine processor_set_threads(
  312.         processor_set    : processor_set_t;
  313.     out    thread_list    : thread_array_t);
  314.  
  315. /*
  316.  *    List all processor sets on host.
  317.  */
  318. routine host_processor_sets(
  319.         host            : host_t;
  320.     out    processor_set_names    : processor_set_name_array_t);
  321.  
  322. /*
  323.  *    Get control port for a processor set.
  324.  */
  325. routine host_processor_set_priv(
  326.         host_priv    : host_priv_t;
  327.         set_name    : processor_set_name_t;
  328.     out    set        : processor_set_t);
  329.