Annotation of Gnu-Mach/include/mach/mach_host.defs, revision 1.1.1.4

1.1       root        1: /*
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1991,1990,1989 Carnegie Mellon University.
                      4:  * Copyright (c) 1993,1994 The University of Utah and
                      5:  * the Computer Systems Laboratory (CSL).
                      6:  * All rights reserved.
                      7:  *
                      8:  * Permission to use, copy, modify and distribute this software and its
                      9:  * documentation is hereby granted, provided that both the copyright
                     10:  * notice and this permission notice appear in all copies of the
                     11:  * software, derivative works or modified versions, and any portions
                     12:  * thereof, and that both notices appear in supporting documentation.
                     13:  *
                     14:  * CARNEGIE MELLON, THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF
                     15:  * THIS SOFTWARE IN ITS "AS IS" CONDITION, AND DISCLAIM ANY LIABILITY
                     16:  * OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF
                     17:  * THIS SOFTWARE.
                     18:  *
                     19:  * Carnegie Mellon requests users of this software to return to
                     20:  *
                     21:  *  Software Distribution Coordinator  or  [email protected]
                     22:  *  School of Computer Science
                     23:  *  Carnegie Mellon University
                     24:  *  Pittsburgh PA 15213-3890
                     25:  *
                     26:  * any improvements or extensions that they make and grant Carnegie Mellon
                     27:  * the rights to redistribute these changes.
                     28:  */
                     29: /*
                     30:  * File:       mach/mach_host.defs
                     31:  *
                     32:  * Abstract:
                     33:  *     Mach host operations support.  Includes processor allocation and
                     34:  *     control.  
                     35:  */
                     36: 
                     37: subsystem
                     38: #if    KERNEL_SERVER
                     39:          KernelServer
                     40: #endif
                     41:                       mach_host 2600;
                     42: 
                     43: /*
                     44:  *     Basic types
                     45:  */
                     46: 
                     47: #include <mach/std_types.defs>
                     48: #include <mach/mach_types.defs>
                     49: 
1.1.1.3   root       50: #ifdef MACH_HOST_IMPORTS
                     51: MACH_HOST_IMPORTS
                     52: #endif
                     53: 
1.1       root       54: /*
                     55:  *     Get list of processors on this host.
                     56:  */
                     57: 
                     58: routine host_processors(
                     59:                host_priv       : host_priv_t;
                     60:        out     processor_list  : processor_array_t);
                     61: 
1.1.1.2   root       62: skip;  /* old yyy_host_info */
                     63: skip;  /* old yyy_processor_info */
1.1       root       64: 
                     65: /*
                     66:  *     Start processor.
                     67:  */
                     68: 
                     69: routine        processor_start(
                     70:                processor       : processor_t);
                     71: 
                     72: /*
                     73:  *     Exit processor -- may not be restartable.
                     74:  */
                     75: 
                     76: routine        processor_exit(
                     77:                processor       : processor_t);
                     78: 
1.1.1.2   root       79: skip;  /* old yyy_processor_control */
1.1       root       80: 
                     81: /*
                     82:  *     Get default processor set for host.
                     83:  */
                     84: routine processor_set_default(
                     85:                host            : host_t;
                     86:        out     default_set     : processor_set_name_t);
                     87: 
1.1.1.2   root       88: skip;  /* old xxx_processor_set_default_priv */
1.1       root       89: 
                     90: /*
                     91:  *     Create new processor set.  Returns real port for manipulations,
                     92:  *     and name port for obtaining information.
                     93:  */
                     94: routine processor_set_create(
                     95:                host            : host_t;
                     96:        out     new_set         : processor_set_t;
                     97:        out     new_name        : processor_set_name_t);
                     98: 
                     99: /*
                    100:  *     Destroy processor set.
                    101:  */
                    102: routine processor_set_destroy(
                    103:                set             : processor_set_t);
                    104: 
1.1.1.2   root      105: skip;  /* old yyy_processor_set_info */
1.1       root      106: 
                    107: /*
                    108:  *     Assign processor to processor set.
                    109:  */
                    110: routine processor_assign(
                    111:                processor       : processor_t;
                    112:                new_set         : processor_set_t;
                    113:                wait            : boolean_t);
                    114: 
                    115: /*
                    116:  *     Get current assignment for processor.
                    117:  */
                    118: 
                    119: routine processor_get_assignment(
                    120:                processor       : processor_t;
                    121:        out     assigned_set    : processor_set_name_t);
                    122: 
                    123: /*
                    124:  *     Assign thread to processor set.
                    125:  */
                    126: routine        thread_assign(
                    127:                thread          : thread_t;
                    128:                new_set         : processor_set_t);
                    129: 
                    130: /*
                    131:  *     Assign thread to default set.
                    132:  */
                    133: routine thread_assign_default(
                    134:                thread          : thread_t);
                    135: 
                    136: /*
                    137:  *     Get current assignment for thread.
                    138:  */
                    139: routine thread_get_assignment(
                    140:                thread          : thread_t;
                    141:        out     assigned_set    : processor_set_name_t);
                    142: 
                    143: /*
                    144:  *     Assign task to processor set.
                    145:  */
                    146: routine task_assign(
                    147:                task            : task_t;
                    148:                new_set         : processor_set_t;
                    149:                assign_threads  : boolean_t);
                    150: /*
                    151:  *     Assign task to default set.
                    152:  */
                    153: routine task_assign_default(
                    154:                task            : task_t;
                    155:                assign_threads  : boolean_t);
                    156: 
                    157: /*
                    158:  *     Get current assignment for task.
                    159:  */
                    160: routine task_get_assignment(
                    161:                task            : task_t;
                    162:        out     assigned_set    : processor_set_name_t);
                    163: 
                    164: /*
                    165:  *     Get string describing current kernel version.
                    166:  */
                    167: routine        host_kernel_version(
                    168:                host            : host_t;
                    169:        out     kernel_version  : kernel_version_t);
                    170: 
                    171: /*
                    172:  *     Set priority for thread.
                    173:  */
                    174: routine thread_priority(
                    175:                thread          : thread_t;
                    176:                priority        : int;
                    177:                set_max         : boolean_t);
                    178: 
                    179: /*
                    180:  *     Set max priority for thread.
                    181:  */
                    182: routine thread_max_priority(
                    183:                thread          : thread_t;
                    184:                processor_set   : processor_set_t;
                    185:                max_priority    : int);
                    186: 
                    187: /*
                    188:  *     Set task priority.
                    189:  */
                    190: routine task_priority(
                    191:                task            : task_t;
                    192:                priority        : int;
                    193:                change_threads  : boolean_t);
                    194: 
                    195: /*
                    196:  *     Set max priority for processor_set.
                    197:  */
                    198: routine processor_set_max_priority(
                    199:                processor_set   : processor_set_t;
                    200:                max_priority    : int;
                    201:                change_threads  : boolean_t);
                    202: 
                    203: /*
                    204:  *     Set policy for thread
                    205:  */
                    206: routine thread_policy(
                    207:                thread          : thread_t;
                    208:                policy          : int;
                    209:                data            : int);
                    210: 
                    211: /*
                    212:  *     Enable policy for processor set
                    213:  */
                    214: routine processor_set_policy_enable(
                    215:                processor_set   : processor_set_t;
                    216:                policy          : int);
                    217: 
                    218: /*
                    219:  *     Disable policy for processor set
                    220:  */
                    221: routine processor_set_policy_disable(
                    222:                processor_set   : processor_set_t;
                    223:                policy          : int;
                    224:                change_threads  : boolean_t);
                    225: /*
                    226:  *     List all tasks in processor set.
                    227:  */
                    228: routine processor_set_tasks(
                    229:                processor_set   : processor_set_t;
                    230:        out     task_list       : task_array_t);
                    231: 
                    232: /*
                    233:  *     List all threads in processor set.
                    234:  */
                    235: routine processor_set_threads(
                    236:                processor_set   : processor_set_t;
                    237:        out     thread_list     : thread_array_t);
                    238: 
                    239: /*
                    240:  *     List all processor sets on host.
                    241:  */
                    242: routine host_processor_sets(
                    243:                host            : host_t;
                    244:        out     processor_sets  : processor_set_name_array_t);
                    245: 
                    246: /*
                    247:  *     Get control port for a processor set.
                    248:  */
                    249: routine host_processor_set_priv(
                    250:                host_priv       : host_priv_t;
                    251:                set_name        : processor_set_name_t;
                    252:        out     set             : processor_set_t);
                    253: 
                    254: routine thread_depress_abort(
                    255:                thread          : thread_t);
                    256: 
                    257: /*
                    258:  *     Set the time on this host.
                    259:  *     Only available to privileged users.
                    260:  */
                    261: routine host_set_time(
                    262:                host_priv       : host_priv_t;
                    263:                new_time        : time_value_t);
                    264: 
                    265: /*
                    266:  *     Arrange for the time on this host to be gradually changed
                    267:  *     by an adjustment value, and return the old value.
                    268:  *     Only available to privileged users.
                    269:  */
                    270: routine        host_adjust_time(
                    271:                host_priv       : host_priv_t;
                    272:        in      new_adjustment  : time_value_t;
                    273:        out     old_adjustment  : time_value_t);
                    274: 
                    275: /*
                    276:  *     Get the time on this host.
                    277:  *     Available to all.
                    278:  */
                    279: routine        host_get_time(
                    280:                host            : host_t;
                    281:        out     current_time    : time_value_t);
                    282: 
                    283: /*
                    284:  *     Reboot this host.
                    285:  *     Only available to privileged users.
                    286:  */
                    287: routine host_reboot(
                    288:                host_priv       : host_priv_t;
                    289:                options         : int);
                    290: 
                    291: /*
                    292:  *     Specify that the range of the virtual address space
                    293:  *     of the target task must not cause page faults for
                    294:  *     the indicated accesses.
                    295:  *
                    296:  *     [ To unwire the pages, specify VM_PROT_NONE. ]
                    297:  */
                    298: routine        vm_wire(
1.1.1.4 ! root      299:                host            : mach_port_t;
1.1       root      300:                task            : vm_task_t;
                    301:                address         : vm_address_t;
                    302:                size            : vm_size_t;
                    303:                access          : vm_prot_t);
                    304: 
                    305: /*
                    306:  *     Specify that the target thread must always be able
                    307:  *     to run and to allocate memory.
                    308:  */
                    309: routine        thread_wire(
                    310:                host_priv       : host_priv_t;
                    311:                thread          : thread_t;
                    312:                wired           : boolean_t);
                    313: 
                    314: /*
                    315:  *     Return information about this host.
                    316:  */
                    317: 
                    318: routine host_info(
                    319:                host            : host_t;
                    320:                flavor          : int;
                    321:        out     host_info_out   : host_info_t, CountInOut);
                    322: 
                    323: 
                    324: /*
                    325:  *     Return information about this processor.
                    326:  */
                    327: routine processor_info(
                    328:                processor       : processor_t;
                    329:                flavor          : int;
                    330:        out     host            : host_t;
                    331:        out     processor_info_out: processor_info_t, CountInOut);
                    332: 
                    333: /*
                    334:  *     Get information about processor set.
                    335:  */
                    336: routine processor_set_info(
                    337:                set_name        : processor_set_name_t;
                    338:                flavor          : int;
                    339:        out     host            : host_t;
                    340:        out     info_out        : processor_set_info_t, CountInOut);
                    341: 
                    342: /*
                    343:  *     Do something machine-dependent to processor.
                    344:  */
                    345: routine processor_control(
                    346:                processor       : processor_t;
                    347:                processor_cmd   : processor_info_t);
                    348: 
                    349: /*
                    350:  *      Get boot configuration information from kernel.
                    351:  */
                    352: routine host_get_boot_info(
                    353:                host_priv       : host_priv_t;
                    354:        out     boot_info       : kernel_boot_info_t);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.