home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Headers / mach / memory_object_default.defs < prev    next >
Text File  |  1995-01-05  |  6KB  |  180 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie Mellon
  24.  * the rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    memory_object_default.defs,v $
  29.  * Revision 2.8  91/08/28  11:15:24  jsb
  30.  *     Added conditionalized sequence number support.
  31.  *     [91/08/13            rpd]
  32.  * 
  33.  * Revision 2.7  91/07/01  08:25:22  jsb
  34.  *     If KERNEL and NORMA_VM, then use a userprefix (to allow interposition).
  35.  *     [91/06/29  16:35:53  jsb]
  36.  * 
  37.  * Revision 2.6  91/06/25  10:30:41  rpd
  38.  *     Changed the port-based type declarations
  39.  *     to use mach_port_t as the C type name.
  40.  *     [91/05/23            rpd]
  41.  * 
  42.  * Revision 2.5  91/05/14  16:56:08  mrt
  43.  *     Correcting copyright
  44.  * 
  45.  * Revision 2.4  91/02/05  17:34:05  mrt
  46.  *     Changed to new Mach copyright
  47.  *     [91/02/01  17:19:22  mrt]
  48.  * 
  49.  * Revision 2.3  90/08/06  17:06:16  rpd
  50.  *     For compatibility with Mach 2.5, added dealloc to
  51.  *     argument of memory_object_create.
  52.  *     [90/08/04            rpd]
  53.  * 
  54.  * Revision 2.2  90/06/02  14:59:00  rpd
  55.  *     Converted to new IPC.
  56.  *     [90/03/26  22:35:46  rpd]
  57.  * 
  58.  * Revision 2.1  89/08/03  17:18:28  rwd
  59.  * Created.
  60.  * 
  61.  * Revision 2.3  89/02/25  18:38:29  gm0w
  62.  *     Changes for cleanup.
  63.  * 
  64.  * Revision 2.2  89/01/15  16:31:26  rpd
  65.  *     Moved from kern/ to mach/.
  66.  *     [89/01/15  14:40:47  rpd]
  67.  * 
  68.  * Revision 2.7  89/01/12  07:58:30  rpd
  69.  *     Fixed includes.
  70.  *     [89/01/12  04:52:50  rpd]
  71.  * 
  72.  * Revision 2.6  88/08/25  18:17:23  mwyoung
  73.  *     Rid the kernel_task of rights to the new memory_object in
  74.  *     memory_object_create.
  75.  *     Add size argument to memory_object_create.
  76.  *     [88/08/11  18:47:16  mwyoung]
  77.  * 
  78.  * Revision 2.5  88/08/06  18:23:00  rpd
  79.  * Added dealloc flag to new_memory_object arg of memory_object_create().
  80.  * Otherwise, kernel_task is left with send right, and this is very bad.
  81.  * 
  82.  * 29-Jun-88  Michael Young (mwyoung) at Carnegie-Mellon University
  83.  *    Use new types.
  84.  *
  85.  * 29-Jun-88  Michael Young (mwyoung) at Carnegie-Mellon University
  86.  *    Moved data type declarations to "mach_types.defs".
  87.  *
  88.  *  9-Dec-87  Michael Young (mwyoung) at Carnegie-Mellon University
  89.  *    Created.
  90.  */
  91. /*
  92.  * File:    mach/memory_object_default.defs
  93.  *
  94.  * Abstract:
  95.  *    Mach external memory management interface declaration; subset
  96.  *    that is applicable to managers of kernel-created memory objects.
  97.  */
  98.  
  99. subsystem
  100. #if    KERNEL_USER
  101.       KernelUser
  102. #endif    KERNEL_USER
  103.              memory_object_default 2250;
  104.  
  105. #include <mach/std_types.defs>
  106. #include <mach/mach_types.defs>
  107.  
  108. #if    SEQNOS
  109. serverprefix seqnos_;
  110. serverdemux seqnos_memory_object_default_server;
  111. #endif    SEQNOS
  112.  
  113. /*
  114.  *    Pass on responsibility for the new kernel-created memory
  115.  *    object.  The port on which this request is that port
  116.  *    (possibly a memory object itself) registered as the "default
  117.  *    pager".  Other arguments are as described for memory_object_init.
  118.  *    [No reply required.]
  119.  */
  120. simpleroutine    memory_object_create(
  121.         old_memory_object    : memory_object_t =
  122.                         MACH_MSG_TYPE_MOVE_SEND
  123.                         ctype: mach_port_t;
  124. #if    SEQNOS
  125.     msgseqno seqno            : mach_port_seqno_t;
  126. #endif    SEQNOS
  127.         new_memory_object    : memory_object_t =
  128.                         MACH_MSG_TYPE_MOVE_RECEIVE
  129.                         ctype: mach_port_t
  130. #if    KERNEL_USER
  131.         /* for compatibility with Mach 2.5 kernels */
  132.                         , dealloc
  133. #endif    KERNEL_USER
  134.                         ;
  135.         new_object_size        : vm_size_t;
  136.         new_control_port    : memory_object_control_t =
  137.                         MACH_MSG_TYPE_MAKE_SEND
  138.                         ctype: mach_port_t;
  139.         new_name        : memory_object_name_t =
  140.                         MACH_MSG_TYPE_MAKE_SEND
  141.                         ctype: mach_port_t;
  142.         new_page_size        : vm_size_t);
  143.  
  144. /*
  145.  *    Provide initial data contents for this region of
  146.  *    the memory object.  If data has already been written
  147.  *    to the object, this value must be discarded; otherwise,
  148.  *    this call acts identically to memory_object_data_write.
  149.  */
  150. simpleroutine    memory_object_data_initialize(
  151.         memory_object        : memory_object_t;
  152. #if    SEQNOS
  153.     msgseqno seqno            : mach_port_seqno_t;
  154. #endif    SEQNOS
  155.         memory_control_port    : memory_object_control_t =
  156.                         MACH_MSG_TYPE_MAKE_SEND
  157.                         ctype: mach_port_t;
  158.         offset            : vm_offset_t;
  159.         data            : pointer_t);
  160.  
  161. #if    0
  162. /*
  163.  *    Indicate that the specified range of data in this memory object
  164.  *    will not be requested again until it is reinitialized with
  165.  *    memory_object_data_write or memory_object_data_initialize.
  166.  */
  167. simpleroutine    memory_object_data_terminate(
  168.         memory_object        : memory_object_t;
  169. #if    SEQNOS
  170.     msgseqno seqno            : mach_port_seqno_t;
  171. #endif    SEQNOS
  172.         memory_control_port    : memory_object_control_t =
  173.                         MACH_MSG_TYPE_MAKE_SEND
  174.                         ctype: mach_port_t;
  175.         offset            : vm_offset_t;
  176.         size            : vm_size_t);
  177. #else    0
  178. skip;    /* memory_object_data_terminate */
  179. #endif    0
  180.