diff options
author | Marin Ramesa <mpr@hi.t-com.hr> | 2013-12-16 23:55:17 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-12-17 19:03:52 +0100 |
commit | 5a5ec187ae6cb2afc874ad9ef118ef634e9164c8 (patch) | |
tree | 2b4a7146254a713bce9eb2c8cf95635a6969a435 /vm | |
parent | cea1f71ee21451d89cddeff04d8145697a5deab8 (diff) |
vm: qualify pointers whose dereferenced values are constant with const
Diffstat (limited to 'vm')
-rw-r--r-- | vm/memory_object.c | 4 | ||||
-rw-r--r-- | vm/memory_object_proxy.c | 8 | ||||
-rw-r--r-- | vm/memory_object_proxy.h | 8 | ||||
-rw-r--r-- | vm/vm_debug.c | 2 | ||||
-rw-r--r-- | vm/vm_external.c | 4 | ||||
-rw-r--r-- | vm/vm_map.c | 8 | ||||
-rw-r--r-- | vm/vm_print.h | 4 | ||||
-rw-r--r-- | vm/vm_resident.c | 2 | ||||
-rw-r--r-- | vm/vm_user.c | 2 |
9 files changed, 21 insertions, 21 deletions
diff --git a/vm/memory_object.c b/vm/memory_object.c index 404ae73..024856d 100644 --- a/vm/memory_object.c +++ b/vm/memory_object.c @@ -1032,7 +1032,7 @@ kern_return_t memory_object_get_attributes(object, object_ready, * If successful, consumes the supplied naked send right. */ kern_return_t vm_set_default_memory_manager(host, default_manager) - host_t host; + const host_t host; ipc_port_t *default_manager; { ipc_port_t current_manager; @@ -1114,7 +1114,7 @@ ipc_port_t memory_manager_default_reference(void) */ boolean_t memory_manager_default_port(port) - ipc_port_t port; + const ipc_port_t port; { ipc_port_t current; boolean_t result; diff --git a/vm/memory_object_proxy.c b/vm/memory_object_proxy.c index 4fed312..a64bfcc 100644 --- a/vm/memory_object_proxy.c +++ b/vm/memory_object_proxy.c @@ -115,11 +115,11 @@ memory_object_proxy_notify (mach_msg_header_t *msg) given OBJECT at OFFSET in the new object with the maximum protection MAX_PROTECTION and return it in *PORT. */ kern_return_t -memory_object_create_proxy (ipc_space_t space, vm_prot_t max_protection, +memory_object_create_proxy (const ipc_space_t space, vm_prot_t max_protection, ipc_port_t *object, natural_t object_count, - vm_offset_t *offset, natural_t offset_count, - vm_offset_t *start, natural_t start_count, - vm_offset_t *len, natural_t len_count, + const vm_offset_t *offset, natural_t offset_count, + const vm_offset_t *start, natural_t start_count, + const vm_offset_t *len, natural_t len_count, ipc_port_t *port) { memory_object_proxy_t proxy; diff --git a/vm/memory_object_proxy.h b/vm/memory_object_proxy.h index 8c2bc0f..3de6996 100644 --- a/vm/memory_object_proxy.h +++ b/vm/memory_object_proxy.h @@ -30,15 +30,15 @@ extern void memory_object_proxy_init (void); extern boolean_t memory_object_proxy_notify (mach_msg_header_t *msg); -extern kern_return_t memory_object_create_proxy (ipc_space_t space, +extern kern_return_t memory_object_create_proxy (const ipc_space_t space, vm_prot_t max_protection, ipc_port_t *object, natural_t object_count, - vm_offset_t *offset, + const vm_offset_t *offset, natural_t offset_count, - vm_offset_t *start, + const vm_offset_t *start, natural_t start_count, - vm_offset_t *len, + const vm_offset_t *len, natural_t len_count, ipc_port_t *port); extern kern_return_t memory_object_proxy_lookup (ipc_port_t port, diff --git a/vm/vm_debug.c b/vm/vm_debug.c index a240ba8..e4a4b8b 100644 --- a/vm/vm_debug.c +++ b/vm/vm_debug.c @@ -434,7 +434,7 @@ mach_vm_object_pages(object, pagesp, countp) kern_return_t host_virtual_physical_table_info(host, infop, countp) - host_t host; + const host_t host; hash_info_bucket_array_t *infop; natural_t *countp; { diff --git a/vm/vm_external.c b/vm/vm_external.c index e9643ff..77bd44b 100644 --- a/vm/vm_external.c +++ b/vm/vm_external.c @@ -97,8 +97,8 @@ void vm_external_destroy(e) } vm_external_state_t _vm_external_state_get(e, offset) - vm_external_t e; - vm_offset_t offset; + const vm_external_t e; + vm_offset_t offset; { unsigned int bit, byte; diff --git a/vm/vm_map.c b/vm/vm_map.c index 55ceb75..e6eabdb 100644 --- a/vm/vm_map.c +++ b/vm/vm_map.c @@ -256,7 +256,7 @@ vm_map_t vm_map_create(pmap, min, max, pageable) _vm_map_entry_create(&(copy)->cpy_hdr) vm_map_entry_t _vm_map_entry_create(map_header) - struct vm_map_header *map_header; + const struct vm_map_header *map_header; { kmem_cache_t cache; vm_map_entry_t entry; @@ -285,7 +285,7 @@ vm_map_entry_t _vm_map_entry_create(map_header) _vm_map_entry_dispose(&(copy)->cpy_hdr, (entry)) void _vm_map_entry_dispose(map_header, entry) - struct vm_map_header *map_header; + const struct vm_map_header *map_header; vm_map_entry_t entry; { kmem_cache_t cache; @@ -4715,7 +4715,7 @@ kern_return_t vm_map_machine_attribute(map, address, size, attribute, value) * vm_map_print: [ debug ] */ void vm_map_print(map) - vm_map_t map; + vm_map_t map; { vm_map_entry_t entry; @@ -4783,7 +4783,7 @@ void vm_map_print(map) */ void vm_map_copy_print(copy) - vm_map_copy_t copy; + const vm_map_copy_t copy; { int i, npages; diff --git a/vm/vm_print.h b/vm/vm_print.h index c2c2918..eab534e 100644 --- a/vm/vm_print.h +++ b/vm/vm_print.h @@ -26,7 +26,7 @@ extern void vm_map_print(vm_map_t); /* Pretty-print a copy object for ddb. */ -extern void vm_map_copy_print(vm_map_copy_t); +extern void vm_map_copy_print(const vm_map_copy_t); #include <vm/vm_object.h> @@ -34,7 +34,7 @@ extern void vm_object_print(vm_object_t); #include <vm/vm_page.h> -extern void vm_page_print(vm_page_t); +extern void vm_page_print(const vm_page_t); #endif /* VM_PRINT_H */ diff --git a/vm/vm_resident.c b/vm/vm_resident.c index 7644fd3..6f34041 100644 --- a/vm/vm_resident.c +++ b/vm/vm_resident.c @@ -1505,7 +1505,7 @@ vm_page_info( * Routine: vm_page_print [exported] */ void vm_page_print(p) - vm_page_t p; + const vm_page_t p; { iprintf("Page 0x%X: object 0x%X,", (vm_offset_t) p, (vm_offset_t) p->object); printf(" offset 0x%X", p->offset); diff --git a/vm/vm_user.c b/vm/vm_user.c index f721e87..9ba5e1c 100644 --- a/vm/vm_user.c +++ b/vm/vm_user.c @@ -411,7 +411,7 @@ kern_return_t vm_map( * [ To unwire the pages, specify VM_PROT_NONE. ] */ kern_return_t vm_wire(host, map, start, size, access) - host_t host; + const host_t host; vm_map_t map; vm_offset_t start; vm_size_t size; |