summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-10-02 00:37:43 +0200
committerJustus Winter <justus@gnupg.org>2016-10-03 22:31:26 +0200
commit8d327ced8c2e539a0e845f522f56a84f6474f5ca (patch)
tree312d6cfc98ed78c56eb7743e43ab910218181fcc /include
parentd8162a1f9e3baf1a6f0bf9f025ea7d0cdee13d3b (diff)
Remove deprecated external memory management interface.
* NEWS: Update. * device/dev_pager.c (device_pager_data_request): Prune unused branch. (device_pager_data_request_done): Remove function. (device_pager_data_write): Likewise. (device_pager_data_write_done): Likewise. (device_pager_copy): Use 'memory_object_ready'. * device/dev_pager.h (device_pager_data_write_done): Remove prototype. * device/device_pager.srv (memory_object_data_write): Remove macro. * doc/mach.texi: Update documentation. * include/mach/mach.defs (memory_object_data_provided): Drop RPC. (memory_object_set_attributes): Likewise. * include/mach/memory_object.defs: Update comments. (memory_object_data_write): Drop RPC. * include/mach/memory_object_default.defs: Update comments. * include/mach_debug/vm_info.h (VOI_STATE_USE_OLD_PAGEOUT): Drop macro. * vm/memory_object.c (memory_object_data_provided): Remove function. (memory_object_data_error): Simplify. (memory_object_set_attributes_common): Make static, remove unused parameters, simplify. (memory_object_change_attributes): Update callsite. (memory_object_set_attributes): Remove function. (memory_object_ready): Update callsite. * vm/vm_debug.c (mach_vm_object_info): Adapt to the changes. * vm/vm_object.c (vm_object_bootstrap): Likewise. * vm/vm_object.h (struct vm_object): Drop flag 'use_old_pageout'. * vm/vm_pageout.c: Update comments. (vm_pageout_page): Simplify.
Diffstat (limited to 'include')
-rw-r--r--include/mach/mach.defs28
-rw-r--r--include/mach/memory_object.defs60
-rw-r--r--include/mach/memory_object_default.defs4
-rw-r--r--include/mach_debug/vm_info.h1
4 files changed, 25 insertions, 68 deletions
diff --git a/include/mach/mach.defs b/include/mach/mach.defs
index 20dc8637..c6ad0770 100644
--- a/include/mach/mach.defs
+++ b/include/mach/mach.defs
@@ -325,23 +325,7 @@ skip;
#endif /* ! KERNEL_USER */
-/*
- * Provide the data contents of a range of the given memory
- * object, with the access restriction specified. [Only
- * whole virtual pages of data can be accepted; partial pages
- * will be discarded. Data should be provided on request, but
- * may be provided in advance as desired. When data already
- * held by this kernel is provided again, the new data is ignored.
- * The access restriction is the subset of {read, write, execute}
- * which are prohibited. The kernel may not provide any data (or
- * protection) consistency among pages with different virtual page
- * alignments within the same object.]
- */
-simpleroutine memory_object_data_provided(
- memory_control : memory_object_control_t;
- offset : vm_offset_t;
- data : pointer_t;
- lock_value : vm_prot_t);
+skip; /* was: memory_object_data_provided */
/*
* Indicate that a range of the given temporary memory object does
@@ -662,15 +646,7 @@ simpleroutine memory_object_data_error(
size : vm_size_t;
error_value : kern_return_t);
-/*
- * Make decisions regarding the use of the specified
- * memory object.
- */
-simpleroutine memory_object_set_attributes(
- memory_control : memory_object_control_t;
- object_ready : boolean_t;
- may_cache : boolean_t;
- copy_strategy : memory_object_copy_strategy_t);
+skip; /* was: memory_object_set_attributes */
/*
*/
diff --git a/include/mach/memory_object.defs b/include/mach/memory_object.defs
index 6372ded8..0d3c2786 100644
--- a/include/mach/memory_object.defs
+++ b/include/mach/memory_object.defs
@@ -57,10 +57,10 @@ 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;
@@ -76,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
@@ -144,8 +145,9 @@ 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;
@@ -171,7 +173,7 @@ 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;
@@ -204,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
@@ -300,13 +283,12 @@ simpleroutine memory_object_supply_completed(
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.]
*/
diff --git a/include/mach/memory_object_default.defs b/include/mach/memory_object_default.defs
index cfd54a48..e62f14dd 100644
--- a/include/mach/memory_object_default.defs
+++ b/include/mach/memory_object_default.defs
@@ -84,7 +84,7 @@ simpleroutine memory_object_create(
* Provide initial data contents for this region of
* the memory object. If data has already been written
* to the object, this value must be discarded; otherwise,
- * this call acts identically to memory_object_data_write.
+ * this call acts identically to memory_object_data_return.
*/
simpleroutine memory_object_data_initialize(
memory_object : memory_object_t;
@@ -101,7 +101,7 @@ simpleroutine memory_object_data_initialize(
/*
* Indicate that the specified range of data in this memory object
* will not be requested again until it is reinitialized with
- * memory_object_data_write or memory_object_data_initialize.
+ * memory_object_data_return or memory_object_data_initialize.
*/
simpleroutine memory_object_data_terminate(
memory_object : memory_object_t;
diff --git a/include/mach_debug/vm_info.h b/include/mach_debug/vm_info.h
index 70ba8878..b50fb92d 100644
--- a/include/mach_debug/vm_info.h
+++ b/include/mach_debug/vm_info.h
@@ -75,7 +75,6 @@ typedef natural_t vm_object_info_state_t;
#define VOI_STATE_ALIVE 0x00000040
#define VOI_STATE_LOCK_IN_PROGRESS 0x00000080
#define VOI_STATE_LOCK_RESTART 0x00000100
-#define VOI_STATE_USE_OLD_PAGEOUT 0x00000200
typedef struct vm_object_info {
vm_offset_t voi_object; /* this object */