Annotation of kernel/mach/mach_host.defs, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
        !             7:  * Reserved.  This file contains Original Code and/or Modifications of
        !             8:  * Original Code as defined in and that are subject to the Apple Public
        !             9:  * Source License Version 1.1 (the "License").  You may not use this file
        !            10:  * except in compliance with the License.  Please obtain a copy of the
        !            11:  * License at http://www.apple.com/publicsource and read it before using
        !            12:  * this file.
        !            13:  * 
        !            14:  * The Original Code and all software distributed under the License are
        !            15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
        !            16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
        !            17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
        !            18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
        !            19:  * License for the specific language governing rights and limitations
        !            20:  * under the License.
        !            21:  * 
        !            22:  * @APPLE_LICENSE_HEADER_END@
        !            23:  */
        !            24: 
        !            25: /* 
        !            26:  * Mach Operating System
        !            27:  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
        !            28:  * All Rights Reserved.
        !            29:  * 
        !            30:  * Permission to use, copy, modify and distribute this software and its
        !            31:  * documentation is hereby granted, provided that both the copyright
        !            32:  * notice and this permission notice appear in all copies of the
        !            33:  * software, derivative works or modified versions, and any portions
        !            34:  * thereof, and that both notices appear in supporting documentation.
        !            35:  * 
        !            36:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
        !            37:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
        !            38:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
        !            39:  * 
        !            40:  * Carnegie Mellon requests users of this software to return to
        !            41:  * 
        !            42:  *  Software Distribution Coordinator  or  [email protected]
        !            43:  *  School of Computer Science
        !            44:  *  Carnegie Mellon University
        !            45:  *  Pittsburgh PA 15213-3890
        !            46:  * 
        !            47:  * any improvements or extensions that they make and grant Carnegie Mellon
        !            48:  * the rights to redistribute these changes.
        !            49:  */
        !            50: /*
        !            51:  * HISTORY
        !            52:  * $Log: mach_host.defs,v $
        !            53:  * Revision 1.2.218.4  1999/03/16 17:05:39  wsanchez
        !            54:  * Substitute License
        !            55:  *
        !            56:  * Revision 1.2.218.3  1999/03/16 15:28:02  wsanchez
        !            57:  * Substitute copyright
        !            58:  *
        !            59:  * Revision 1.2.218.2  1999/03/16 10:37:38  umeshv
        !            60:  * Fixed errors in previous commit.
        !            61:  *
        !            62:  * Revision 1.2.218.1  1999/03/11 09:52:49  umeshv
        !            63:  * Added copyrights.
        !            64:  *
        !            65:  * Revision 1.2  1998/11/25 19:39:12  wsanchez
        !            66:  * Merged in PR-2288345 (mwatson: mach_host.defs id's offset by one)
        !            67:  *
        !            68:  * Revision 1.1.1.1.440.1  1998/11/24 19:30:54  mwatson
        !            69:  * Remove unused routine, now that -DNeXT is gone.
        !            70:  *
        !            71:  * Revision 1.1.1.1  1997/09/30 02:44:50  wsanchez
        !            72:  * Import of kernel from umeshv/kernel
        !            73:  *
        !            74:  * Revision 2.10  92/03/10  16:26:54  jsb
        !            75:  *     From [email protected]: added host_get_boot_info.
        !            76:  *     [92/01/08  15:01:12  jsb]
        !            77:  * 
        !            78:  * Revision 2.9  92/02/19  16:07:19  elf
        !            79:  *     Reenable thread_depress_abort.
        !            80:  *     [92/01/20            rwd]
        !            81:  * 
        !            82:  * Revision 2.8  92/01/03  20:21:13  dbg
        !            83:  *     Add 'CountInOut' tag to routines returning variable-length
        !            84:  *     inline arrays.  Remove 'IsLong' tag from routines passing or
        !            85:  *     returning variable-length arrays.  Old routines left under
        !            86:  *     'xxx_' names.  REMOVE THESE SOON!
        !            87:  *     [91/11/26            dbg]
        !            88:  * 
        !            89:  * Revision 2.7  91/07/31  17:53:39  dbg
        !            90:  *     Add vm_wire and thread_wire.
        !            91:  *     [91/07/30  17:10:17  dbg]
        !            92:  * 
        !            93:  * Revision 2.6  91/05/14  16:54:32  mrt
        !            94:  *     Correcting copyright
        !            95:  * 
        !            96:  * Revision 2.5  91/02/05  17:33:20  mrt
        !            97:  *     Changed to new Mach copyright
        !            98:  *     [91/02/01  17:17:52  mrt]
        !            99:  * 
        !           100:  * Revision 2.4  90/09/09  14:33:08  rpd
        !           101:  *     Restored processor_set_create's out arguments.
        !           102:  *     [90/08/30            rpd]
        !           103:  * 
        !           104:  * Revision 2.3  90/08/07  18:00:21  rpd
        !           105:  *     Removed thread_depress_abort.  Changed host_processor_sets
        !           106:  *     to use unprivileged ports.
        !           107:  *     [90/08/06            rpd]
        !           108:  * 
        !           109:  * Revision 2.2  90/06/02  14:58:17  rpd
        !           110:  *     Created for new host/processor technology.
        !           111:  *     [90/03/26  23:51:11  rpd]
        !           112:  * 
        !           113:  *     Remove KERNEL_SERVER define.  Cleanup.
        !           114:  *     [89/08/02            dlb]
        !           115:  *     Add IsLong specifiers to variable length arguments to info calls.
        !           116:  *     [89/08/02            dlb]
        !           117:  *     Add thread_depress_abort.
        !           118:  *     [89/06/20            dlb]
        !           119:  * 
        !           120:  *     Add processor_set_{tasks,threads}, host_processor_sets,
        !           121:  *     host_processor_set_priv.
        !           122:  *     [89/06/08            dlb]
        !           123:  * 
        !           124:  *     Add priority and policy calls.
        !           125:  *     [89/05/12            dlb]
        !           126:  * 
        !           127:  *     Move type definitions to mach_types.defs, delete kernel keyword.
        !           128:  *     [89/01/25            dlb]
        !           129:  * 
        !           130:  *     Moved to mach/ from kern/
        !           131:  *     [89/01/25            dlb]
        !           132:  * 
        !           133:  *     Split processor_set_default.  Add task_assign_default and
        !           134:  *     thread_assign_default.
        !           135:  *     [88/12/21            dlb]
        !           136:  * 
        !           137:  *     Minor cleanups, add host_kernel_version.
        !           138:  *     [88/12/02            dlb]
        !           139:  * 
        !           140:  * Revision 2.4  89/12/22  15:54:26  rpd
        !           141:  *     Under KERNEL_SERVER, pass the out arguments of
        !           142:  *     processor_set_create as port_t's.  They really are
        !           143:  *     the appropriate processor set types, but processor_set_create
        !           144:  *     does the type conversions internally.  This isn't pretty.
        !           145:  *     [89/12/15            dlb]
        !           146:  * 
        !           147:  * Revision 2.3  89/10/15  02:05:40  rpd
        !           148:  *     Minor cleanups.
        !           149:  * 
        !           150:  * Revision 2.2  89/10/11  14:38:34  dlb
        !           151:  *     Add IsLong specifiers to variable length arguments to info calls.
        !           152:  *     Add thread_depress_abort.
        !           153:  *     Add processor_set_{tasks,threads}, host_processor_sets,
        !           154:  *            host_processor_set_priv.
        !           155:  *     Add priority and policy calls.
        !           156:  *     Split processor_set_default.  Add task_assign_default and
        !           157:  *            thread_assign_default.
        !           158:  *     Add host_kernel_version.
        !           159:  * 
        !           160:  * Revision 2.1  89/01/30  16:17:06  dlb
        !           161:  * Created.
        !           162:  * 
        !           163:  */
        !           164: 
        !           165: /*
        !           166:  * File:       mach/mach_host.defs
        !           167:  *
        !           168:  * Abstract:
        !           169:  *     Mach host operations support.  Includes processor allocation and
        !           170:  *     control.  
        !           171:  */
        !           172: 
        !           173: subsystem
        !           174: #if    KERNEL_SERVER && defined(MACH_IPC_FLAVOR)
        !           175:          KernelServer
        !           176: #endif KERNEL_SERVER
        !           177:                       mach_host 2600;
        !           178: 
        !           179: /*
        !           180:  *     Basic types
        !           181:  */
        !           182: 
        !           183: #include <mach/std_types.defs>
        !           184: #include <mach/mach_types.defs>
        !           185: 
        !           186: /*
        !           187:  *     Get list of processors on this host.
        !           188:  */
        !           189: 
        !           190: routine host_processors(
        !           191:                host_priv       : host_priv_t;
        !           192:        out     processor_list  : processor_array_t);
        !           193: 
        !           194: /*
        !           195:  *     Return information about this host.
        !           196:  */
        !           197: 
        !           198: routine host_info(
        !           199:                host            : host_t;
        !           200:                flavor          : int;
        !           201:        out     host_info_out   : host_info_t, IsLong);
        !           202: 
        !           203: 
        !           204: /*
        !           205:  *     Return information about this processor.
        !           206:  */
        !           207: routine processor_info(
        !           208:                processor       : processor_t;
        !           209:                flavor          : int;
        !           210:        out     host            : host_t;
        !           211:        out     processor_info_out: processor_info_t, IsLong);
        !           212: 
        !           213: /*
        !           214:  *     Start processor.
        !           215:  */
        !           216: 
        !           217: routine        processor_start(
        !           218:                processor       : processor_t);
        !           219: 
        !           220: /*
        !           221:  *     Exit processor -- may not be restartable.
        !           222:  */
        !           223: 
        !           224: routine        processor_exit(
        !           225:                processor       : processor_t);
        !           226: 
        !           227: /*
        !           228:  *     Do something machine-dependent to processor.
        !           229:  */
        !           230: routine processor_control(
        !           231:                processor       : processor_t;
        !           232:                processor_cmd   : processor_info_t, IsLong);
        !           233: 
        !           234: /*
        !           235:  *     Get default processor set for host.
        !           236:  */
        !           237: routine processor_set_default(
        !           238:                host            : host_t;
        !           239:        out     default_set     : processor_set_name_t);
        !           240: 
        !           241: /*
        !           242:  *     Create new processor set.  Returns real port for manipulations,
        !           243:  *     and name port for obtaining information.
        !           244:  */
        !           245: routine processor_set_create(
        !           246:                host            : host_t;
        !           247:        out     new_set         : processor_set_t;
        !           248:        out     new_name        : processor_set_name_t);
        !           249: 
        !           250: /*
        !           251:  *     Destroy processor set.
        !           252:  */
        !           253: routine processor_set_destroy(
        !           254:                set             : processor_set_t);
        !           255: 
        !           256: /*
        !           257:  *     Get information about processor set.
        !           258:  */
        !           259: routine processor_set_info(
        !           260:                set_name        : processor_set_name_t;
        !           261:                flavor          : int;
        !           262:        out     host            : host_t;
        !           263:        out     info_out        : processor_set_info_t, IsLong);
        !           264: 
        !           265: /*
        !           266:  *     Assign processor to processor set.
        !           267:  */
        !           268: routine processor_assign(
        !           269:                processor       : processor_t;
        !           270:                new_set         : processor_set_t;
        !           271:                wait            : boolean_t);
        !           272: 
        !           273: /*
        !           274:  *     Get current assignment for processor.
        !           275:  */
        !           276: 
        !           277: routine processor_get_assignment(
        !           278:                processor       : processor_t;
        !           279:        out     assigned_set    : processor_set_name_t);
        !           280: 
        !           281: /*
        !           282:  *     Assign thread to processor set.
        !           283:  */
        !           284: routine        thread_assign(
        !           285:                thread          : thread_t;
        !           286:                new_set         : processor_set_t);
        !           287: 
        !           288: /*
        !           289:  *     Assign thread to default set.
        !           290:  */
        !           291: routine thread_assign_default(
        !           292:                thread          : thread_t);
        !           293: 
        !           294: /*
        !           295:  *     Get current assignment for thread.
        !           296:  */
        !           297: routine thread_get_assignment(
        !           298:                thread          : thread_t;
        !           299:        out     assigned_set    : processor_set_name_t);
        !           300: 
        !           301: /*
        !           302:  *     Assign task to processor set.
        !           303:  */
        !           304: routine task_assign(
        !           305:                task            : task_t;
        !           306:                new_set         : processor_set_t;
        !           307:                assign_threads  : boolean_t);
        !           308: /*
        !           309:  *     Assign task to default set.
        !           310:  */
        !           311: routine task_assign_default(
        !           312:                task            : task_t;
        !           313:                assign_threads  : boolean_t);
        !           314: 
        !           315: /*
        !           316:  *     Get current assignment for task.
        !           317:  */
        !           318: routine task_get_assignment(
        !           319:                task            : task_t;
        !           320:        out     assigned_set    : processor_set_name_t);
        !           321: 
        !           322: /*
        !           323:  *     Get string describing current kernel version.
        !           324:  */
        !           325: routine        host_kernel_version(
        !           326:                host            : host_t;
        !           327:        out     kernel_version  : kernel_version_t);
        !           328: 
        !           329: /*
        !           330:  *     Set priority for thread.
        !           331:  */
        !           332: routine thread_priority(
        !           333:                thread          : thread_t;
        !           334:                priority        : int;
        !           335:                set_max         : boolean_t);
        !           336: 
        !           337: /*
        !           338:  *     Set max priority for thread.
        !           339:  */
        !           340: routine thread_max_priority(
        !           341:                thread          : thread_t;
        !           342:                processor_set   : processor_set_t;
        !           343:                max_priority    : int);
        !           344: 
        !           345: /*
        !           346:  *     Set task priority.
        !           347:  */
        !           348: routine task_priority(
        !           349:                task            : task_t;
        !           350:                priority        : int;
        !           351:                change_threads  : boolean_t);
        !           352: 
        !           353: /*
        !           354:  *     Set max priority for processor_set.
        !           355:  */
        !           356: routine processor_set_max_priority(
        !           357:                processor_set   : processor_set_t;
        !           358:                max_priority    : int;
        !           359:                change_threads  : boolean_t);
        !           360: 
        !           361: /*
        !           362:  *     Set policy for thread
        !           363:  */
        !           364: routine thread_policy(
        !           365:                thread          : thread_t;
        !           366:                policy          : int;
        !           367:                data            : int);
        !           368: 
        !           369: /*
        !           370:  *     Enable policy for processor set
        !           371:  */
        !           372: routine processor_set_policy_enable(
        !           373:                processor_set   : processor_set_t;
        !           374:                policy          : int);
        !           375: 
        !           376: /*
        !           377:  *     Disable policy for processor set
        !           378:  */
        !           379: routine processor_set_policy_disable(
        !           380:                processor_set   : processor_set_t;
        !           381:                policy          : int;
        !           382:                change_threads  : boolean_t);
        !           383: /*
        !           384:  *     List all tasks in processor set.
        !           385:  */
        !           386: routine processor_set_tasks(
        !           387:                processor_set   : processor_set_t;
        !           388:        out     task_list       : task_array_t);
        !           389: 
        !           390: /*
        !           391:  *     List all threads in processor set.
        !           392:  */
        !           393: routine processor_set_threads(
        !           394:                processor_set   : processor_set_t;
        !           395:        out     thread_list     : thread_array_t);
        !           396: 
        !           397: /*
        !           398:  *     List all processor sets on host.
        !           399:  */
        !           400: routine host_processor_sets(
        !           401:                host            : host_t;
        !           402:        out     processor_sets  : processor_set_name_array_t);
        !           403: 
        !           404: /*
        !           405:  *     Get control port for a processor set.
        !           406:  */
        !           407: routine host_processor_set_priv(
        !           408:                host_priv       : host_priv_t;
        !           409:                set_name        : processor_set_name_t;
        !           410:        out     set             : processor_set_t);
        !           411: 
        !           412: routine thread_depress_abort(
        !           413:                thread          : thread_t);
        !           414: 
        !           415: skip;  /* host_set_time */
        !           416: skip;  /* host_adjust_time */
        !           417: skip;  /* host_get_time */
        !           418: skip;  /* host_reboot */
        !           419: 
        !           420: /*
        !           421: **     Specify that the range of the virtual address space
        !           422: **     of the target task must not cause page faults for
        !           423: **     the indicated accesses.
        !           424: **
        !           425: **     [ To unwire the pages, specify VM_PROT_NONE. ]
        !           426: */
        !           427: routine vm_wire(
        !           428:                host_priv       : host_priv_t;
        !           429:                task            : vm_task_t;
        !           430:                address         : vm_address_t;
        !           431:                size            : vm_size_t;
        !           432:                acccess         : vm_prot_t);
        !           433: 
        !           434: skip;  /* thread_wire */
        !           435: skip;  /* host_info:           MACH 3.0 */
        !           436: skip;  /* processor_info:      MACH 3.0 */
        !           437: skip;  /* processor_set_info:  MACH 3.0 */
        !           438: skip;  /* processor_control:   MACH 3.0 */
        !           439: skip;  /* host_get_boot_info:  MACH 3.0 */

unix.superglobalmegacorp.com

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