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

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