--- Gnu-Mach/include/mach/memory_object.defs 2020/09/02 04:36:57 1.1.1.1 +++ Gnu-Mach/include/mach/memory_object.defs 2020/09/02 04:54:33 1.1.1.5 @@ -1,25 +1,25 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ @@ -33,26 +33,23 @@ subsystem #if KERNEL_USER KernelUser -#endif KERNEL_USER +#endif /* KERNEL_USER */ #if KERNEL_SERVER KernelServer -#endif KERNEL_SERVER +#endif /* KERNEL_SERVER */ memory_object 2200; -#ifdef KERNEL -#include -#if NORMA_VM -userprefix k_; -#endif NORMA_VM -#endif KERNEL - #include #include +#ifdef MEMORY_OBJECT_IMPORTS +MEMORY_OBJECT_IMPORTS +#endif + #if SEQNOS serverprefix seqnos_; serverdemux seqnos_memory_object_server; -#endif SEQNOS +#endif /* SEQNOS */ /* * Initialize the specified memory object, providing @@ -60,16 +57,16 @@ serverdemux seqnos_memory_object_server; * a name port that identifies this object to callers of * vm_regions. * [To allow the mapping of this object to be used, the - * memory manager must call memory_object_set_attributes, - * specifying the "ready" parameter as TRUE. To reject - * all mappings of this object, the memory manager may - * use memory_object_destroy.] + * memory manager must call memory_object_ready or + * memory_object_change_attributes. To reject all mappings of + * this object, the memory manager may use + * memory_object_destroy.] */ simpleroutine memory_object_init( memory_object : memory_object_t; #if SEQNOS msgseqno seqno : mach_port_seqno_t; -#endif SEQNOS +#endif /* SEQNOS */ memory_control : memory_object_control_t = MACH_MSG_TYPE_MAKE_SEND ctype: mach_port_t; @@ -79,11 +76,12 @@ simpleroutine memory_object_init( memory_object_page_size : vm_size_t); /* - * Indicates that the specified memory object is no longer - * mapped (or cached -- see memory_object_set_attributes), - * and that further mappings will cause another memory_object_init - * call to be made. No further calls will be made on - * the memory object by this kernel. + * Indicates that the specified memory object is no longer mapped + * (or cached -- see memory_object_ready or + * memory_object_change_attributes), and that further mappings + * will cause another memory_object_init call to be made. No + * further calls will be made on the memory object by this + * kernel. * * [All rights to the control and name ports are included * in this call. The memory manager should use port_deallocate @@ -92,17 +90,28 @@ simpleroutine memory_object_init( simpleroutine memory_object_terminate( memory_object : memory_object_t = MACH_MSG_TYPE_MOVE_SEND - ctype: mach_port_t; + ctype: mach_port_t +#ifdef MEMORY_OBJECT_INTRAN + intran: MEMORY_OBJECT_INTRAN +#endif +#ifdef MEMORY_OBJECT_INTRAN_PAYLOAD + intranpayload: + MEMORY_OBJECT_INTRAN_PAYLOAD +#endif +#ifdef MEMORY_OBJECT_DESTRUCTOR + destructor: MEMORY_OBJECT_DESTRUCTOR +#endif + ; #if SEQNOS msgseqno seqno : mach_port_seqno_t; -#endif SEQNOS +#endif /* SEQNOS */ memory_control : memory_object_control_t = MACH_MSG_TYPE_MOVE_RECEIVE ctype: mach_port_t #if KERNEL_USER /* for compatibility with Mach 2.5 kernels */ , dealloc -#endif KERNEL_USER +#endif /* KERNEL_USER */ ; memory_object_name : memory_object_name_t = MACH_MSG_TYPE_MOVE_RECEIVE @@ -110,7 +119,7 @@ simpleroutine memory_object_terminate( #if KERNEL_USER /* for compatibility with Mach 2.5 kernels */ , dealloc -#endif KERNEL_USER +#endif /* KERNEL_USER */ ); /* @@ -136,14 +145,15 @@ simpleroutine memory_object_terminate( * call to indicate that the appropriate page of the original * memory object may be used to fulfill a data request. * - * [Reply should be memory_object_set_attributes on the - * new memory object control port to indicate readiness.] + * [Reply should be memory_object_ready or + * memory_object_change_attributes on the new memory object control + * port to indicate readiness.] */ simpleroutine memory_object_copy( old_memory_object : memory_object_t; #if SEQNOS msgseqno seqno : mach_port_seqno_t; -#endif SEQNOS +#endif /* SEQNOS */ old_memory_control : memory_object_control_t = MACH_MSG_TYPE_MAKE_SEND ctype: mach_port_t; @@ -155,7 +165,7 @@ simpleroutine memory_object_copy( #if KERNEL_USER /* for compatibility with Mach 2.5 kernels */ , dealloc -#endif KERNEL_USER +#endif /* KERNEL_USER */ ); /* @@ -163,13 +173,13 @@ simpleroutine memory_object_copy( * the specified data should be returned with at * least the specified access permitted. * - * [Reply should be memory_object_data_provided.] + * [Reply should be memory_object_data_supply.] */ simpleroutine memory_object_data_request( memory_object : memory_object_t; #if SEQNOS msgseqno seqno : mach_port_seqno_t; -#endif SEQNOS +#endif /* SEQNOS */ memory_control : memory_object_control_t = MACH_MSG_TYPE_MAKE_SEND ctype: mach_port_t; @@ -188,7 +198,7 @@ simpleroutine memory_object_data_unlock( memory_object : memory_object_t; #if SEQNOS msgseqno seqno : mach_port_seqno_t; -#endif SEQNOS +#endif /* SEQNOS */ memory_control : memory_object_control_t = MACH_MSG_TYPE_MAKE_SEND ctype: mach_port_t; @@ -196,26 +206,7 @@ simpleroutine memory_object_data_unlock( length : vm_size_t; desired_access : vm_prot_t); -/* - * Write back modifications made to this portion of - * the memory object while in memory. - * - * Unless explicitly requested by a memory_object_lock_request - * (clean, but not flush), the kernel will not retain - * the data. - * - * [Reply should be vm_deallocate to release the data.] - */ -simpleroutine memory_object_data_write( - memory_object : memory_object_t; -#if SEQNOS - msgseqno seqno : mach_port_seqno_t; -#endif SEQNOS - memory_control : memory_object_control_t = - MACH_MSG_TYPE_MAKE_SEND - ctype: mach_port_t; - offset : vm_offset_t; - data : pointer_t); +skip; /* was: memory_object_data_write */ /* * Indicate that a previous memory_object_lock_reqeust has been @@ -228,10 +219,20 @@ simpleroutine memory_object_data_write( simpleroutine memory_object_lock_completed( memory_object : memory_object_t = polymorphic|MACH_MSG_TYPE_PORT_SEND_ONCE - ctype: mach_port_t; + ctype: mach_port_t +#ifdef MEMORY_OBJECT_INTRAN + intran: MEMORY_OBJECT_INTRAN +#endif +#ifdef MEMORY_OBJECT_INTRAN_PAYLOAD + intranpayload: MEMORY_OBJECT_INTRAN_PAYLOAD +#endif +#ifdef MEMORY_OBJECT_DESTRUCTOR + destructor: MEMORY_OBJECT_DESTRUCTOR +#endif + ; #if SEQNOS msgseqno seqno : mach_port_seqno_t; -#endif SEQNOS +#endif /* SEQNOS */ memory_control : memory_object_control_t = MACH_MSG_TYPE_MAKE_SEND ctype: mach_port_t; @@ -259,10 +260,20 @@ simpleroutine memory_object_lock_complet simpleroutine memory_object_supply_completed( memory_object : memory_object_t = polymorphic|MACH_MSG_TYPE_PORT_SEND_ONCE - ctype: mach_port_t; + ctype: mach_port_t +#ifdef MEMORY_OBJECT_INTRAN + intran: MEMORY_OBJECT_INTRAN +#endif +#ifdef MEMORY_OBJECT_INTRAN_PAYLOAD + intranpayload: MEMORY_OBJECT_INTRAN_PAYLOAD +#endif +#ifdef MEMORY_OBJECT_DESTRUCTOR + destructor: MEMORY_OBJECT_DESTRUCTOR +#endif + ; #if SEQNOS msgseqno seqno : mach_port_seqno_t; -#endif SEQNOS +#endif /* SEQNOS */ memory_control : memory_object_control_t = MACH_MSG_TYPE_MAKE_SEND ctype: mach_port_t; @@ -272,13 +283,12 @@ simpleroutine memory_object_supply_compl error_offset : vm_offset_t); /* - * Return data to manager. This call is used in place of data_write - * for objects initialized by object_ready instead of set_attributes. - * This call indicates whether the returned data is dirty and whether - * the kernel kept a copy. Precious data remains precious if the - * kernel keeps a copy. The indication that the kernel kept a copy - * is only a hint if the data is not precious; the cleaned copy may - * be discarded without further notifying the manager. + * Return data to manager. This call indicates whether the + * returned data is dirty and whether the kernel kept a copy. + * Precious data remains precious if the kernel keeps a copy. + * The indication that the kernel kept a copy is only a hint if + * the data is not precious; the cleaned copy may be discarded + * without further notifying the manager. * * [Reply should be vm_deallocate to release the data.] */ @@ -286,7 +296,7 @@ simpleroutine memory_object_data_retur memory_object : memory_object_t; #if SEQNOS msgseqno seqno : mach_port_seqno_t; -#endif SEQNOS +#endif /* SEQNOS */ memory_control : memory_object_control_t = MACH_MSG_TYPE_MAKE_SEND ctype: mach_port_t; @@ -305,9 +315,19 @@ simpleroutine memory_object_data_retur simpleroutine memory_object_change_completed( memory_object : memory_object_t = polymorphic|MACH_MSG_TYPE_PORT_SEND_ONCE - ctype: mach_port_t; + ctype: mach_port_t +#ifdef MEMORY_OBJECT_INTRAN + intran: MEMORY_OBJECT_INTRAN +#endif +#ifdef MEMORY_OBJECT_INTRAN_PAYLOAD + intranpayload: MEMORY_OBJECT_INTRAN_PAYLOAD +#endif +#ifdef MEMORY_OBJECT_DESTRUCTOR + destructor: MEMORY_OBJECT_DESTRUCTOR +#endif + ; #if SEQNOS msgseqno seqno : mach_port_seqno_t; -#endif SEQNOS +#endif /* SEQNOS */ may_cache : boolean_t; copy_strategy : memory_object_copy_strategy_t);