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

1.1       root        1: /*
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1991,1990,1989,1988 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:  *     Matchmaker definitions file for Mach kernel interface.
                     31:  */
                     32: 
                     33: subsystem
                     34: #if    KERNEL_USER
                     35:          KernelUser
                     36: #endif /* KERNEL_USER */
                     37: #if    KERNEL_SERVER
                     38:          KernelServer
                     39: #endif /* KERNEL_SERVER */
                     40:                       mach 2000;
                     41: 
                     42: #ifdef KERNEL_USER
                     43: userprefix r_;
                     44: #endif /* KERNEL_USER */
                     45: 
                     46: #include <mach/std_types.defs>
                     47: #include <mach/mach_types.defs>
                     48: 
1.1.1.4   root       49: #ifdef MACH_IMPORTS
                     50: MACH_IMPORTS
                     51: #endif
                     52: 
1.1       root       53: skip;  /* old port_allocate */
                     54: skip;  /* old port_deallocate */
                     55: skip;  /* old port_enable */
                     56: skip;  /* old port_disable */
                     57: skip;  /* old port_select */
                     58: skip;  /* old port_set_backlog */
                     59: skip;  /* old port_status */
                     60: 
1.1.1.5 ! root       61: /* We use only a handful of RPCs as client.  Skip the rest.  */
        !            62: #if    ! KERNEL_USER
        !            63: 
1.1       root       64: /*
                     65:  *     Create a new task with an empty set of IPC rights,
                     66:  *     and having an address space constructed from the
                     67:  *     target task (or empty, if inherit_memory is FALSE).
                     68:  */
                     69: routine task_create(
                     70:                target_task     : task_t;
                     71:                inherit_memory  : boolean_t;
                     72:        out     child_task      : task_t);
                     73: 
                     74: /*
                     75:  *     Destroy the target task, causing all of its threads
                     76:  *     to be destroyed, all of its IPC rights to be deallocated,
                     77:  *     and all of its address space to be deallocated.
                     78:  */
                     79: routine task_terminate(
                     80:                target_task     : task_t);
                     81: 
                     82: /*
                     83:  *     Get user-level handler entry points for all
                     84:  *     emulated system calls.
                     85:  */
                     86: routine task_get_emulation_vector(
                     87:                task            : task_t;
                     88:        out     vector_start    : int;
                     89:        out     emulation_vector: emulation_vector_t);
                     90: 
                     91: /*
                     92:  *     Establish user-level handlers for the specified
                     93:  *     system calls. Non-emulated system calls are specified
                     94:  *     with emulation_vector[i] == EML_ROUTINE_NULL.
                     95:  */
                     96: routine task_set_emulation_vector(
                     97:                task            : task_t;
                     98:                vector_start    : int;
                     99:                emulation_vector: emulation_vector_t);
                    100: 
                    101: 
                    102: /*
                    103:  *     Returns the set of threads belonging to the target task.
                    104:  */
                    105: routine task_threads(
                    106:                target_task     : task_t;
                    107:        out     thread_list     : thread_array_t);
                    108: 
                    109: /*
                    110:  *     Returns information about the target task.
                    111:  */
                    112: routine        task_info(
                    113:                target_task     : task_t;
                    114:                flavor          : int;
                    115:        out     task_info_out   : task_info_t, CountInOut);
                    116: 
                    117: 
                    118: skip;  /* old task_status */
                    119: skip;  /* old task_set_notify */
                    120: skip;  /* old thread_create */
                    121: 
                    122: /*
                    123:  *     Destroy the target thread.
                    124:  */
                    125: routine thread_terminate(
                    126:                target_thread   : thread_t);
                    127: 
                    128: /*
                    129:  *     Return the selected state information for the target
                    130:  *     thread.  If the thread is currently executing, the results
                    131:  *     may be stale.  [Flavor THREAD_STATE_FLAVOR_LIST provides a
                    132:  *     list of valid flavors for the target thread.]
                    133:  */
                    134: routine thread_get_state(
                    135:                target_thread   : thread_t;
                    136:                flavor          : int;
                    137:        out     old_state       : thread_state_t, CountInOut);
                    138: 
                    139: /*
                    140:  *     Set the selected state information for the target thread.
                    141:  *     If the thread is currently executing, the state change
                    142:  *     may be ill-defined.
                    143:  */
                    144: routine        thread_set_state(
                    145:                target_thread   : thread_t;
                    146:                flavor          : int;
                    147:                new_state       : thread_state_t);
                    148: 
                    149: /*
                    150:  *     Returns information about the target thread.
                    151:  */
                    152: routine        thread_info(
                    153:                target_thread   : thread_t;
                    154:                flavor          : int;
                    155:        out     thread_info_out : thread_info_t, CountInOut);
                    156: 
                    157: skip;  /* old thread_mutate */
                    158: 
                    159: /*
                    160:  *     Allocate zero-filled memory in the address space
                    161:  *     of the target task, either at the specified address,
                    162:  *     or wherever space can be found (if anywhere is TRUE),
                    163:  *     of the specified size.  The address at which the
                    164:  *     allocation actually took place is returned.
                    165:  */
                    166: #ifdef EMULATOR
                    167: skip;  /* the emulator redefines vm_allocate using vm_map */
1.1.1.2   root      168: #else  /* EMULATOR */
1.1       root      169: routine vm_allocate(
                    170:                target_task     : vm_task_t;
                    171:        inout   address         : vm_address_t;
                    172:                size            : vm_size_t;
                    173:                anywhere        : boolean_t);
1.1.1.2   root      174: #endif /* EMULATOR */
1.1       root      175: 
                    176: skip;  /* old vm_allocate_with_pager */
                    177: 
                    178: /*
                    179:  *     Deallocate the specified range from the virtual
                    180:  *     address space of the target task.
                    181:  */
                    182: routine vm_deallocate(
                    183:                target_task     : vm_task_t;
                    184:                address         : vm_address_t;
                    185:                size            : vm_size_t);
                    186: 
                    187: /*
                    188:  *     Set the current or maximum protection attribute
                    189:  *     for the specified range of the virtual address
                    190:  *     space of the target task.  The current protection
                    191:  *     limits the memory access rights of threads within
                    192:  *     the task; the maximum protection limits the accesses
                    193:  *     that may be given in the current protection.
                    194:  *     Protections are specified as a set of {read, write, execute}
                    195:  *     *permissions*.
                    196:  */
                    197: routine vm_protect(
                    198:                target_task     : vm_task_t;
                    199:                address         : vm_address_t;
                    200:                size            : vm_size_t;
                    201:                set_maximum     : boolean_t;
                    202:                new_protection  : vm_prot_t);
                    203: 
                    204: /*
                    205:  *     Set the inheritance attribute for the specified range
                    206:  *     of the virtual address space of the target task.
                    207:  *     The inheritance value is one of {none, copy, share}, and
                    208:  *     specifies how the child address space should acquire
                    209:  *     this memory at the time of a task_create call.
                    210:  */
                    211: routine vm_inherit(
                    212:                target_task     : vm_task_t;
                    213:                address         : vm_address_t;
                    214:                size            : vm_size_t;
                    215:                new_inheritance : vm_inherit_t);
                    216: 
                    217: /*
                    218:  *     Returns the contents of the specified range of the
                    219:  *     virtual address space of the target task.  [The
                    220:  *     range must be aligned on a virtual page boundary,
                    221:  *     and must be a multiple of pages in extent.  The
                    222:  *     protection on the specified range must permit reading.]
                    223:  */
                    224: routine vm_read(
                    225:                target_task     : vm_task_t;
                    226:                address         : vm_address_t;
                    227:                size            : vm_size_t;
                    228:        out     data            : pointer_t);
                    229: 
                    230: /*
                    231:  *     Writes the contents of the specified range of the
                    232:  *     virtual address space of the target task.  [The
                    233:  *     range must be aligned on a virtual page boundary,
                    234:  *     and must be a multiple of pages in extent.  The
                    235:  *     protection on the specified range must permit writing.]
                    236:  */
                    237: routine vm_write(
                    238:                target_task     : vm_task_t;
                    239:                address         : vm_address_t;
                    240:                data            : pointer_t);
                    241: 
                    242: /*
                    243:  *     Copy the contents of the source range of the virtual
                    244:  *     address space of the target task to the destination
                    245:  *     range in that same address space.  [Both of the
                    246:  *     ranges must be aligned on a virtual page boundary,
                    247:  *     and must be multiples of pages in extent.  The
                    248:  *     protection on the source range must permit reading,
                    249:  *     and the protection on the destination range must
                    250:  *     permit writing.]
                    251:  */
                    252: routine vm_copy(
                    253:                target_task     : vm_task_t;
                    254:                source_address  : vm_address_t;
                    255:                size            : vm_size_t;
                    256:                dest_address    : vm_address_t);
                    257: 
                    258: /*
                    259:  *     Returns information about the contents of the virtual
                    260:  *     address space of the target task at the specified
                    261:  *     address.  The returned protection, inheritance, sharing
                    262:  *     and memory object values apply to the entire range described
                    263:  *     by the address range returned; the memory object offset
                    264:  *     corresponds to the beginning of the address range.
                    265:  *     [If the specified address is not allocated, the next
                    266:  *     highest address range is described.  If no addresses beyond
                    267:  *     the one specified are allocated, the call returns KERN_NO_SPACE.]
                    268:  */
                    269: routine vm_region(
                    270:                target_task     : vm_task_t;
                    271:        inout   address         : vm_address_t;
                    272:        out     size            : vm_size_t;
                    273:        out     protection      : vm_prot_t;
                    274:        out     max_protection  : vm_prot_t;
                    275:        out     inheritance     : vm_inherit_t;
                    276:        out     is_shared       : boolean_t;
                    277:        /* avoid out-translation of the argument */
                    278:        out     object_name     : memory_object_name_t =
                    279:                                        MACH_MSG_TYPE_MOVE_SEND
                    280:                                        ctype: mach_port_t;
                    281:        out     offset          : vm_offset_t);
                    282: 
                    283: /*
                    284:  *     Return virtual memory statistics for the host
                    285:  *     on which the target task resides.  [Note that the
                    286:  *     statistics are not specific to the target task.]
                    287:  */
                    288: routine vm_statistics(
                    289:                target_task     : vm_task_t;
                    290:        out     vm_stats        : vm_statistics_data_t);
                    291: 
                    292: skip;  /* old task_by_u*x_pid */
                    293: skip;  /* old vm_pageable */
                    294: 
                    295: /*
                    296:  *     Stash a handful of ports for the target task; child
                    297:  *     tasks inherit this stash at task_create time.
                    298:  */
                    299: routine        mach_ports_register(
                    300:                target_task     : task_t;
                    301:                init_port_set   : mach_port_array_t =
                    302:                                        ^array[] of mach_port_t);
                    303: 
                    304: /*
                    305:  *     Retrieve the stashed ports for the target task.
                    306:  */
                    307: routine        mach_ports_lookup(
                    308:                target_task     : task_t;
                    309:        out     init_port_set   : mach_port_array_t =
                    310:                                        ^array[] of mach_port_t);
                    311: 
                    312: skip;  /* old u*x_pid */
                    313: skip;  /* old netipc_listen */
                    314: skip;  /* old netipc_ignore */
                    315: 
1.1.1.5 ! root      316: #else  /* ! KERNEL_USER */
        !           317: 
        !           318: skip;  skip;   skip;   skip;   skip;
        !           319: skip;  skip;   skip;   skip;   skip;
        !           320: skip;  skip;   skip;   skip;   skip;
        !           321: skip;  skip;   skip;   skip;   skip;
        !           322: skip;  skip;   skip;   skip;   skip;
        !           323: skip;  skip;   skip;   skip;   skip;
        !           324: skip;
        !           325: 
        !           326: #endif /* ! KERNEL_USER */
        !           327: 
1.1       root      328: /*
                    329:  *     Provide the data contents of a range of the given memory
                    330:  *     object, with the access restriction specified.  [Only
                    331:  *     whole virtual pages of data can be accepted; partial pages
                    332:  *     will be discarded.  Data should be provided on request, but
                    333:  *     may be provided in advance as desired.  When data already
                    334:  *     held by this kernel is provided again, the new data is ignored.
                    335:  *     The access restriction is the subset of {read, write, execute}
                    336:  *     which are prohibited.  The kernel may not provide any data (or
                    337:  *     protection) consistency among pages with different virtual page
                    338:  *     alignments within the same object.]
                    339:  */
                    340: simpleroutine memory_object_data_provided(
                    341:                memory_control  : memory_object_control_t;
                    342:                offset          : vm_offset_t;
                    343:                data            : pointer_t;
                    344:                lock_value      : vm_prot_t);
                    345: 
                    346: /*
                    347:  *     Indicate that a range of the given temporary memory object does
                    348:  *     not exist, and that the backing memory object should be used
                    349:  *     instead (or zero-fill memory be used, if no backing object exists).
                    350:  *     [This call is intended for use only by the default memory manager.
                    351:  *     It should not be used to indicate a real error --
                    352:  *     memory_object_data_error should be used for that purpose.]
                    353:  */
                    354: simpleroutine memory_object_data_unavailable(
                    355:                memory_control  : memory_object_control_t;
                    356:                offset          : vm_offset_t;
                    357:                size            : vm_size_t);
                    358: 
                    359: /*
                    360:  *     Retrieves the attributes currently associated with
                    361:  *     a memory object.
                    362:  */
                    363: routine memory_object_get_attributes(
                    364:                memory_control  : memory_object_control_t;
                    365:        out     object_ready    : boolean_t;
                    366:        out     may_cache       : boolean_t;
                    367:        out     copy_strategy   : memory_object_copy_strategy_t);
                    368: 
1.1.1.5 ! root      369: #if    ! KERNEL_USER
        !           370: 
1.1       root      371: /*
                    372:  *     Sets the default memory manager, the port to which
                    373:  *     newly-created temporary memory objects are delivered.
                    374:  *     [See (memory_object_default)memory_object_create.]
                    375:  *     The old memory manager port is returned.
                    376:  */
                    377: routine vm_set_default_memory_manager(
                    378:                host_priv       : host_priv_t;
                    379:        inout   default_manager : mach_port_make_send_t);
                    380: 
1.1.1.5 ! root      381: #else  /* ! KERNEL_USER */
        !           382: 
        !           383: skip;
        !           384: 
        !           385: #endif /* ! KERNEL_USER */
        !           386: 
1.1       root      387: skip;  /* old pager_flush_request */
                    388: 
                    389: /*
                    390:  *     Control use of the data associated with the given
                    391:  *     memory object.  For each page in the given range,
                    392:  *     perform the following operations, in order:
                    393:  *             1)  restrict access to the page (disallow
                    394:  *                 forms specified by "prot");
                    395:  *             2)  write back modifications (if "should_return"
                    396:  *                 is RETURN_DIRTY and the page is dirty, or
                    397:  *                 "should_return" is RETURN_ALL and the page
                    398:  *                 is either dirty or precious); and,
                    399:  *             3)  flush the cached copy (if "should_flush"
                    400:  *                 is asserted).
                    401:  *     The set of pages is defined by a starting offset
                    402:  *     ("offset") and size ("size").  Only pages with the
                    403:  *     same page alignment as the starting offset are
                    404:  *     considered.
                    405:  *
                    406:  *     A single acknowledgement is sent (to the "reply_to"
                    407:  *     port) when these actions are complete.
                    408:  *
                    409:  *     There are two versions of this routine because IPC distinguishes
                    410:  *     between booleans and integers (a 2-valued integer is NOT a
                    411:  *     boolean).  The new routine is backwards compatible at the C
                    412:  *     language interface.
                    413:  */
                    414: 
1.1.1.3   root      415: skip;  /* old xxx_memory_object_lock_request */
1.1       root      416: 
                    417: simpleroutine memory_object_lock_request(
                    418:                memory_control  : memory_object_control_t;
                    419:                offset          : vm_offset_t;
                    420:                size            : vm_size_t;
                    421:                should_return   : memory_object_return_t;
                    422:                should_flush    : boolean_t;
                    423:                lock_value      : vm_prot_t;
                    424:                reply_to        : mach_port_t =
                    425:                        MACH_MSG_TYPE_MAKE_SEND_ONCE|polymorphic);
                    426: 
1.1.1.3   root      427: skip;  /* old xxx_task_get_emulation_vector */
                    428: skip;  /* old xxx_task_set_emulation_vector */
                    429: skip;  /* old xxx_host_info */
                    430: skip;  /* old xxx_slot_info */
                    431: skip;  /* old xxx_cpu_control */
1.1       root      432: skip;  /* old thread_statistics */
                    433: skip;  /* old task_statistics */
                    434: skip;  /* old netport_init */
                    435: skip;  /* old netport_enter */
                    436: skip;  /* old netport_remove */
                    437: skip;  /* old thread_set_priority */
                    438: 
1.1.1.5 ! root      439: #if    ! KERNEL_USER
        !           440: 
1.1       root      441: /*
                    442:  *     Increment the suspend count for the target task.
                    443:  *     No threads within a task may run when the suspend
                    444:  *     count for that task is non-zero.
                    445:  */
                    446: routine        task_suspend(
                    447:                target_task     : task_t);
                    448: 
                    449: /*
                    450:  *     Decrement the suspend count for the target task,
                    451:  *     if the count is currently non-zero.  If the resulting
                    452:  *     suspend count is zero, then threads within the task
                    453:  *     that also have non-zero suspend counts may execute.
                    454:  */
                    455: routine        task_resume(
                    456:                target_task     : task_t);
                    457: 
                    458: /*
                    459:  *     Returns the current value of the selected special port
                    460:  *     associated with the target task.
                    461:  */
                    462: routine task_get_special_port(
                    463:                task            : task_t;
                    464:                which_port      : int;
                    465:        out     special_port    : mach_port_t);
                    466: 
                    467: /*
                    468:  *     Set one of the special ports associated with the
                    469:  *     target task.
                    470:  */
                    471: routine task_set_special_port(
                    472:                task            : task_t;
                    473:                which_port      : int;
                    474:                special_port    : mach_port_t);
                    475: 
1.1.1.3   root      476: skip;  /* old xxx_task_info */
1.1       root      477: 
                    478: 
                    479: /*
                    480:  *     Create a new thread within the target task, returning
                    481:  *     the port representing that new thread.  The
                    482:  *     initial execution state of the thread is undefined.
                    483:  */
                    484: routine thread_create(
                    485:                parent_task     : task_t;
                    486:        out     child_thread    : thread_t);
                    487: 
                    488: /*
                    489:  *     Increment the suspend count for the target thread.
                    490:  *     Once this call has completed, the thread will not
                    491:  *     execute any further user or meta- instructions.
                    492:  *     Once suspended, a thread may not execute again until
                    493:  *     its suspend count is zero, and the suspend count
                    494:  *     for its task is also zero.
                    495:  */
                    496: routine        thread_suspend(
                    497:                target_thread   : thread_t);
                    498: 
                    499: /*
                    500:  *     Decrement the suspend count for the target thread,
                    501:  *     if that count is not already zero.
                    502:  */
                    503: routine        thread_resume(
                    504:                target_thread   : thread_t);
                    505: 
                    506: /*
                    507:  *     Cause any user or meta- instructions currently being
                    508:  *     executed by the target thread to be aborted.  [Meta-
                    509:  *     instructions consist of the basic traps for IPC
                    510:  *     (e.g., msg_send, msg_receive) and self-identification
                    511:  *     (e.g., task_self, thread_self, thread_reply).  Calls
                    512:  *     described by MiG interfaces are not meta-instructions
                    513:  *     themselves.]
                    514:  */
                    515: routine thread_abort(
                    516:                target_thread   : thread_t);
                    517: 
1.1.1.3   root      518: skip;  /* old xxx_thread_get_state */
                    519: skip;  /* old xxx_thread_set_state */
1.1       root      520: 
                    521: /*
                    522:  *     Returns the current value of the selected special port
                    523:  *     associated with the target thread.
                    524:  */
                    525: routine thread_get_special_port(
                    526:                thread          : thread_t;
                    527:                which_port      : int;
                    528:        out     special_port    : mach_port_t);
                    529: 
                    530: /*
                    531:  *     Set one of the special ports associated with the
                    532:  *     target thread.
                    533:  */
                    534: routine thread_set_special_port(
                    535:                thread          : thread_t;
                    536:                which_port      : int;
                    537:                special_port    : mach_port_t);
                    538: 
1.1.1.3   root      539: skip;  /* old xxx_thread_info */
1.1       root      540: 
                    541: /*
                    542:  *     Establish a user-level handler for the specified
                    543:  *     system call.
                    544:  */
                    545: routine task_set_emulation(
                    546:                target_port     : task_t;
                    547:                routine_entry_pt: vm_address_t;
1.1.1.2   root      548:                routine_number  : int);
1.1       root      549: 
                    550: /*
                    551:  *      Establish restart pc for interrupted atomic sequences.
                    552:  *     This reuses the message number for the old task_get_io_port.
                    553:  *     See task_info.h for description of flavors.
1.1.1.2   root      554:  *
1.1       root      555:  */
                    556: routine task_ras_control(
                    557:                target_task     : task_t;
                    558:                basepc          : vm_address_t;
                    559:                boundspc        : vm_address_t;
                    560:                flavor          : int);
1.1.1.2   root      561: 
                    562: 
1.1       root      563: 
                    564: skip;  /* old host_ipc_statistics */
                    565: skip;  /* old port_names */
                    566: skip;  /* old port_type */
                    567: skip;  /* old port_rename */
                    568: skip;  /* old port_allocate */
                    569: skip;  /* old port_deallocate */
                    570: skip;  /* old port_set_backlog */
                    571: skip;  /* old port_status */
                    572: skip;  /* old port_set_allocate */
                    573: skip;  /* old port_set_deallocate */
                    574: skip;  /* old port_set_add */
                    575: skip;  /* old port_set_remove */
                    576: skip;  /* old port_set_status */
                    577: skip;  /* old port_insert_send */
                    578: skip;  /* old port_extract_send */
                    579: skip;  /* old port_insert_receive */
                    580: skip;  /* old port_extract_receive */
                    581: 
                    582: /*
                    583:  *     Map a user-defined memory object into the virtual address
                    584:  *     space of the target task.  If desired (anywhere is TRUE),
                    585:  *     the kernel will find a suitable address range of the
                    586:  *     specified size; else, the specific address will be allocated.
                    587:  *
                    588:  *     The beginning address of the range will be aligned on a virtual
                    589:  *     page boundary, be at or beyond the address specified, and
                    590:  *     meet the mask requirements (bits turned on in the mask must not
                    591:  *     be turned on in the result); the size of the range, in bytes,
                    592:  *     will be rounded up to an integral number of virtual pages.
                    593:  *
                    594:  *     The memory in the resulting range will be associated with the
                    595:  *     specified memory object, with the beginning of the memory range
                    596:  *     referring to the specified offset into the memory object.
                    597:  *
                    598:  *     The mapping will take the current and maximum protections and
                    599:  *     the inheritance attributes specified; see the vm_protect and
                    600:  *     vm_inherit calls for a description of these attributes.
                    601:  *
                    602:  *     If desired (copy is TRUE), the memory range will be filled
                    603:  *     with a copy of the data from the memory object; this copy will
                    604:  *     be private to this mapping in this target task.  Otherwise,
                    605:  *     the memory in this mapping will be shared with other mappings
                    606:  *     of the same memory object at the same offset (in this task or
                    607:  *     in other tasks).  [The Mach kernel only enforces shared memory
                    608:  *     consistency among mappings on one host with similar page alignments.
                    609:  *     The user-defined memory manager for this object is responsible
                    610:  *     for further consistency.]
                    611:  */
                    612: #ifdef EMULATOR
                    613: routine htg_vm_map(
                    614:                target_task     : vm_task_t;
                    615:        ureplyport reply_port   : mach_port_make_send_once_t;
                    616:        inout   address         : vm_address_t;
                    617:                size            : vm_size_t;
                    618:                mask            : vm_address_t;
                    619:                anywhere        : boolean_t;
                    620:                memory_object   : memory_object_t;
                    621:                offset          : vm_offset_t;
                    622:                copy            : boolean_t;
                    623:                cur_protection  : vm_prot_t;
                    624:                max_protection  : vm_prot_t;
                    625:                inheritance     : vm_inherit_t);
1.1.1.2   root      626: #else  /* EMULATOR */
1.1       root      627: routine vm_map(
                    628:                target_task     : vm_task_t;
                    629:        inout   address         : vm_address_t;
                    630:                size            : vm_size_t;
                    631:                mask            : vm_address_t;
                    632:                anywhere        : boolean_t;
                    633:                memory_object   : memory_object_t;
                    634:                offset          : vm_offset_t;
                    635:                copy            : boolean_t;
                    636:                cur_protection  : vm_prot_t;
                    637:                max_protection  : vm_prot_t;
                    638:                inheritance     : vm_inherit_t);
1.1.1.2   root      639: #endif /* EMULATOR */
1.1       root      640: 
1.1.1.5 ! root      641: #else  /* ! KERNEL_USER */
        !           642: 
        !           643: skip;  skip;   skip;   skip;   skip;
        !           644: skip;  skip;   skip;   skip;   skip;
        !           645: skip;  skip;   skip;   skip;   skip;
        !           646: skip;  skip;   skip;   skip;   skip;
        !           647: skip;  skip;   skip;   skip;   skip;
        !           648: skip;  skip;   skip;   skip;   skip;
        !           649: skip;  skip;   skip;   skip;
        !           650: 
        !           651: #endif /* ! KERNEL_USER */
        !           652: 
1.1       root      653: /*
                    654:  *     Indicate that a range of the specified memory object cannot
                    655:  *     be provided at this time.  [Threads waiting for memory pages
                    656:  *     specified by this call will experience a memory exception.
                    657:  *     Only threads waiting at the time of the call are affected.]
                    658:  */
                    659: simpleroutine memory_object_data_error(
                    660:                memory_control  : memory_object_control_t;
                    661:                offset          : vm_offset_t;
                    662:                size            : vm_size_t;
                    663:                error_value     : kern_return_t);
                    664: 
                    665: /*
                    666:  *     Make decisions regarding the use of the specified
                    667:  *     memory object.
                    668:  */
                    669: simpleroutine memory_object_set_attributes(
                    670:                memory_control  : memory_object_control_t;
                    671:                object_ready    : boolean_t;
                    672:                may_cache       : boolean_t;
                    673:                copy_strategy   : memory_object_copy_strategy_t);
                    674: 
                    675: /*
                    676:  */
                    677: simpleroutine memory_object_destroy(
                    678:                memory_control  : memory_object_control_t;
                    679:                reason          : kern_return_t);
                    680: 
                    681: /*
                    682:  *     Provide the data contents of a range of the given memory
                    683:  *     object, with the access restriction specified, optional
                    684:  *     precious attribute, and reply message.  [Only
                    685:  *     whole virtual pages of data can be accepted; partial pages
                    686:  *     will be discarded.  Data should be provided on request, but
                    687:  *     may be provided in advance as desired.  When data already
                    688:  *     held by this kernel is provided again, the new data is ignored.
                    689:  *     The access restriction is the subset of {read, write, execute}
                    690:  *     which are prohibited.  The kernel may not provide any data (or
                    691:  *     protection) consistency among pages with different virtual page
                    692:  *     alignments within the same object.  The precious value controls
                    693:  *     how the kernel treats the data.  If it is FALSE, the kernel treats
                    694:  *     its copy as a temporary and may throw it away if it hasn't been
                    695:  *     changed.  If the precious value is TRUE, the kernel treats its
                    696:  *     copy as a data repository and promises to return it to the manager;
                    697:  *     the manager may tell the kernel to throw it away instead by flushing
                    698:  *     and not cleaning the data -- see memory_object_lock_request.  The
                    699:  *     reply_to port is for a compeletion message; it will be
                    700:  *     memory_object_supply_completed.]
                    701:  */
                    702: 
                    703: simpleroutine memory_object_data_supply(
                    704:                memory_control  : memory_object_control_t;
                    705:                offset          : vm_offset_t;
                    706:                data            : pointer_t, Dealloc[];
                    707:                lock_value      : vm_prot_t;
                    708:                precious        : boolean_t;
                    709:                reply_to        : mach_port_t =
                    710:                        MACH_MSG_TYPE_MAKE_SEND_ONCE|polymorphic);
                    711: 
                    712: simpleroutine memory_object_ready(
                    713:                memory_control  : memory_object_control_t;
                    714:                may_cache       : boolean_t;
                    715:                copy_strategy   : memory_object_copy_strategy_t);
                    716: 
                    717: simpleroutine memory_object_change_attributes(
                    718:                memory_control  : memory_object_control_t;
                    719:                may_cache       : boolean_t;
                    720:                copy_strategy   : memory_object_copy_strategy_t;
                    721:                reply_to        : mach_port_t =
                    722:                        MACH_MSG_TYPE_MAKE_SEND_ONCE|polymorphic);
                    723: 
1.1.1.5 ! root      724: #if ! KERNEL_USER
        !           725: 
1.1       root      726: skip;  /* old host_callout_statistics_reset */
                    727: skip;  /* old port_set_select */
                    728: skip;  /* old port_set_backup */
                    729: 
                    730: /*
                    731:  *     Set/Get special properties of memory associated
1.1.1.2   root      732:  *     to some virtual address range, such as cachability,
1.1       root      733:  *     migrability, replicability.  Machine-dependent.
                    734:  */
                    735: routine vm_machine_attribute(
                    736:                target_task     : vm_task_t;
                    737:                address         : vm_address_t;
                    738:                size            : vm_size_t;
                    739:                attribute       : vm_machine_attribute_t;
                    740:        inout   value           : vm_machine_attribute_val_t);
                    741: 
                    742: skip;  /* old host_fpa_counters_reset */
                    743: 
1.1.1.5 ! root      744: #endif /* ! KERNEL_USER */
        !           745: 
1.1       root      746: /*
                    747:  *     There is no more room in this interface for additional calls.
                    748:  */

unix.superglobalmegacorp.com

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