Annotation of OSKit-Mach/include/mach/mach_host.defs, revision 1.1.1.1

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: #ifdef MACH_KERNEL
                     38: simport <kern/compat_xxx_defs.h>;      /* for obsolete routines */
                     39: #endif
                     40: 
                     41: subsystem
                     42: #if    KERNEL_SERVER
                     43:          KernelServer
                     44: #endif
                     45:                       mach_host 2600;
                     46: 
                     47: /*
                     48:  *     Basic types
                     49:  */
                     50: 
                     51: #include <mach/std_types.defs>
                     52: #include <mach/mach_types.defs>
                     53: 
                     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: 
                     62: /* obsolete */
                     63: routine yyy_host_info(
                     64:                host            : host_t;
                     65:                flavor          : int;
                     66:        out     host_info_out   : host_info_t, IsLong);
                     67: 
                     68: 
                     69: /* obsolete */
                     70: routine yyy_processor_info(
                     71:                processor       : processor_t;
                     72:                flavor          : int;
                     73:        out     host            : host_t;
                     74:        out     processor_info_out: processor_info_t, IsLong);
                     75: 
                     76: /*
                     77:  *     Start processor.
                     78:  */
                     79: 
                     80: routine        processor_start(
                     81:                processor       : processor_t);
                     82: 
                     83: /*
                     84:  *     Exit processor -- may not be restartable.
                     85:  */
                     86: 
                     87: routine        processor_exit(
                     88:                processor       : processor_t);
                     89: 
                     90: /* obsolete */
                     91: routine yyy_processor_control(
                     92:                processor       : processor_t;
                     93:                processor_cmd   : processor_info_t, IsLong);
                     94: 
                     95: /*
                     96:  *     Get default processor set for host.
                     97:  */
                     98: routine processor_set_default(
                     99:                host            : host_t;
                    100:        out     default_set     : processor_set_name_t);
                    101: 
                    102: /*
                    103:  *     Get rights to default processor set for host.
                    104:  *     Replaced by host_processor_set_priv.
                    105:  */
                    106: routine xxx_processor_set_default_priv(
                    107:                host            : host_priv_t;
                    108:        out     default_set     : processor_set_t);
                    109: 
                    110: /*
                    111:  *     Create new processor set.  Returns real port for manipulations,
                    112:  *     and name port for obtaining information.
                    113:  */
                    114: routine processor_set_create(
                    115:                host            : host_t;
                    116:        out     new_set         : processor_set_t;
                    117:        out     new_name        : processor_set_name_t);
                    118: 
                    119: /*
                    120:  *     Destroy processor set.
                    121:  */
                    122: routine processor_set_destroy(
                    123:                set             : processor_set_t);
                    124: 
                    125: /* obsolete */
                    126: routine yyy_processor_set_info(
                    127:                set_name        : processor_set_name_t;
                    128:                flavor          : int;
                    129:        out     host            : host_t;
                    130:        out     info_out        : processor_set_info_t, IsLong);
                    131: 
                    132: /*
                    133:  *     Assign processor to processor set.
                    134:  */
                    135: routine processor_assign(
                    136:                processor       : processor_t;
                    137:                new_set         : processor_set_t;
                    138:                wait            : boolean_t);
                    139: 
                    140: /*
                    141:  *     Get current assignment for processor.
                    142:  */
                    143: 
                    144: routine processor_get_assignment(
                    145:                processor       : processor_t;
                    146:        out     assigned_set    : processor_set_name_t);
                    147: 
                    148: /*
                    149:  *     Assign thread to processor set.
                    150:  */
                    151: routine        thread_assign(
                    152:                thread          : thread_t;
                    153:                new_set         : processor_set_t);
                    154: 
                    155: /*
                    156:  *     Assign thread to default set.
                    157:  */
                    158: routine thread_assign_default(
                    159:                thread          : thread_t);
                    160: 
                    161: /*
                    162:  *     Get current assignment for thread.
                    163:  */
                    164: routine thread_get_assignment(
                    165:                thread          : thread_t;
                    166:        out     assigned_set    : processor_set_name_t);
                    167: 
                    168: /*
                    169:  *     Assign task to processor set.
                    170:  */
                    171: routine task_assign(
                    172:                task            : task_t;
                    173:                new_set         : processor_set_t;
                    174:                assign_threads  : boolean_t);
                    175: /*
                    176:  *     Assign task to default set.
                    177:  */
                    178: routine task_assign_default(
                    179:                task            : task_t;
                    180:                assign_threads  : boolean_t);
                    181: 
                    182: /*
                    183:  *     Get current assignment for task.
                    184:  */
                    185: routine task_get_assignment(
                    186:                task            : task_t;
                    187:        out     assigned_set    : processor_set_name_t);
                    188: 
                    189: /*
                    190:  *     Get string describing current kernel version.
                    191:  */
                    192: routine        host_kernel_version(
                    193:                host            : host_t;
                    194:        out     kernel_version  : kernel_version_t);
                    195: 
                    196: /*
                    197:  *     Set priority for thread.
                    198:  */
                    199: routine thread_priority(
                    200:                thread          : thread_t;
                    201:                priority        : int;
                    202:                set_max         : boolean_t);
                    203: 
                    204: /*
                    205:  *     Set max priority for thread.
                    206:  */
                    207: routine thread_max_priority(
                    208:                thread          : thread_t;
                    209:                processor_set   : processor_set_t;
                    210:                max_priority    : int);
                    211: 
                    212: /*
                    213:  *     Set task priority.
                    214:  */
                    215: routine task_priority(
                    216:                task            : task_t;
                    217:                priority        : int;
                    218:                change_threads  : boolean_t);
                    219: 
                    220: /*
                    221:  *     Set max priority for processor_set.
                    222:  */
                    223: routine processor_set_max_priority(
                    224:                processor_set   : processor_set_t;
                    225:                max_priority    : int;
                    226:                change_threads  : boolean_t);
                    227: 
                    228: /*
                    229:  *     Set policy for thread
                    230:  */
                    231: routine thread_policy(
                    232:                thread          : thread_t;
                    233:                policy          : int;
                    234:                data            : int);
                    235: 
                    236: /*
                    237:  *     Enable policy for processor set
                    238:  */
                    239: routine processor_set_policy_enable(
                    240:                processor_set   : processor_set_t;
                    241:                policy          : int);
                    242: 
                    243: /*
                    244:  *     Disable policy for processor set
                    245:  */
                    246: routine processor_set_policy_disable(
                    247:                processor_set   : processor_set_t;
                    248:                policy          : int;
                    249:                change_threads  : boolean_t);
                    250: /*
                    251:  *     List all tasks in processor set.
                    252:  */
                    253: routine processor_set_tasks(
                    254:                processor_set   : processor_set_t;
                    255:        out     task_list       : task_array_t);
                    256: 
                    257: /*
                    258:  *     List all threads in processor set.
                    259:  */
                    260: routine processor_set_threads(
                    261:                processor_set   : processor_set_t;
                    262:        out     thread_list     : thread_array_t);
                    263: 
                    264: /*
                    265:  *     List all processor sets on host.
                    266:  */
                    267: routine host_processor_sets(
                    268:                host            : host_t;
                    269:        out     processor_sets  : processor_set_name_array_t);
                    270: 
                    271: /*
                    272:  *     Get control port for a processor set.
                    273:  */
                    274: routine host_processor_set_priv(
                    275:                host_priv       : host_priv_t;
                    276:                set_name        : processor_set_name_t;
                    277:        out     set             : processor_set_t);
                    278: 
                    279: routine thread_depress_abort(
                    280:                thread          : thread_t);
                    281: 
                    282: /*
                    283:  *     Set the time on this host.
                    284:  *     Only available to privileged users.
                    285:  */
                    286: routine host_set_time(
                    287:                host_priv       : host_priv_t;
                    288:                new_time        : time_value_t);
                    289: 
                    290: /*
                    291:  *     Arrange for the time on this host to be gradually changed
                    292:  *     by an adjustment value, and return the old value.
                    293:  *     Only available to privileged users.
                    294:  */
                    295: routine        host_adjust_time(
                    296:                host_priv       : host_priv_t;
                    297:        in      new_adjustment  : time_value_t;
                    298:        out     old_adjustment  : time_value_t);
                    299: 
                    300: /*
                    301:  *     Get the time on this host.
                    302:  *     Available to all.
                    303:  */
                    304: routine        host_get_time(
                    305:                host            : host_t;
                    306:        out     current_time    : time_value_t);
                    307: 
                    308: /*
                    309:  *     Reboot this host.
                    310:  *     Only available to privileged users.
                    311:  */
                    312: routine host_reboot(
                    313:                host_priv       : host_priv_t;
                    314:                options         : int);
                    315: 
                    316: /*
                    317:  *     Specify that the range of the virtual address space
                    318:  *     of the target task must not cause page faults for
                    319:  *     the indicated accesses.
                    320:  *
                    321:  *     [ To unwire the pages, specify VM_PROT_NONE. ]
                    322:  */
                    323: routine        vm_wire(
                    324:                host_priv       : host_priv_t;
                    325:                task            : vm_task_t;
                    326:                address         : vm_address_t;
                    327:                size            : vm_size_t;
                    328:                access          : vm_prot_t);
                    329: 
                    330: /*
                    331:  *     Specify that the target thread must always be able
                    332:  *     to run and to allocate memory.
                    333:  */
                    334: routine        thread_wire(
                    335:                host_priv       : host_priv_t;
                    336:                thread          : thread_t;
                    337:                wired           : boolean_t);
                    338: 
                    339: /*
                    340:  *     Return information about this host.
                    341:  */
                    342: 
                    343: routine host_info(
                    344:                host            : host_t;
                    345:                flavor          : int;
                    346:        out     host_info_out   : host_info_t, CountInOut);
                    347: 
                    348: 
                    349: /*
                    350:  *     Return information about this processor.
                    351:  */
                    352: routine processor_info(
                    353:                processor       : processor_t;
                    354:                flavor          : int;
                    355:        out     host            : host_t;
                    356:        out     processor_info_out: processor_info_t, CountInOut);
                    357: 
                    358: /*
                    359:  *     Get information about processor set.
                    360:  */
                    361: routine processor_set_info(
                    362:                set_name        : processor_set_name_t;
                    363:                flavor          : int;
                    364:        out     host            : host_t;
                    365:        out     info_out        : processor_set_info_t, CountInOut);
                    366: 
                    367: /*
                    368:  *     Do something machine-dependent to processor.
                    369:  */
                    370: routine processor_control(
                    371:                processor       : processor_t;
                    372:                processor_cmd   : processor_info_t);
                    373: 
                    374: /*
                    375:  *      Get boot configuration information from kernel.
                    376:  */
                    377: routine host_get_boot_info(
                    378:                host_priv       : host_priv_t;
                    379:        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.