aboutsummaryrefslogtreecommitdiff
path: root/include/mach
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2022-11-22 23:46:31 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-11-25 01:26:26 +0100
commitd30481122a5d24ad6b921062f93b9172ef922fc3 (patch)
tree04795cf3ca05fd8133f325cd053c87020b0bec3d /include/mach
parent448e3d676a35e027219c5db224204892dc026b3b (diff)
downloadgnumach-d30481122a5d24ad6b921062f93b9172ef922fc3.tar.gz
gnumach-d30481122a5d24ad6b921062f93b9172ef922fc3.tar.bz2
gnumach-d30481122a5d24ad6b921062f93b9172ef922fc3.zip
Update mach_debug interfaces to use struct.
The new interfaces will be compatible both with a 64 bits kernel and userland and 64 bits kernel and 32 bit userland. Also removed many of the uses of natural_t where an unsigned int suffices. Ideally we should replace natural_t with something more portable such as uintptr_t or a basic int type for counters since for the most part we don't need counters to have the same width as the pointer type. * i386/include/mach/i386/vm_types.h: Define rpc_unsigned_long. * include/mach/mach_types.defs: Define type rpc_vm_offset_t. * include/mach_debug/hash_info.h: Use unsigned int instead of natural_t. * include/mach_debug/mach_debug_types.defs: Update cache_info_t, hash_info_bucket_t, vm_region_info_t, vm_object_info_t and vm_page_info_t to use struct. * include/mach_debug/slab_info.h: Use rpc_vm_size_t and rpc_unsigned_long for compatibility with 32 bits userland. * include/mach_debug/vm_info.h: Update struct fields to use the correct types and avoid natural_t whenever we just want to keep a count of something. Message-Id: <Y32lp1SuV01ImCx9@viriathus>
Diffstat (limited to 'include/mach')
-rw-r--r--include/mach/mach_types.defs4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/mach/mach_types.defs b/include/mach/mach_types.defs
index 4412d726..f7106946 100644
--- a/include/mach/mach_types.defs
+++ b/include/mach/mach_types.defs
@@ -120,6 +120,8 @@ type rpc_vm_size_t = uint32_t;
#endif /* __x86_64__ */
#endif /* KERNEL_SERVER and USER32 */
+type rpc_vm_offset_t = rpc_vm_size_t;
+
type vm_address_t = rpc_vm_size_t
#if defined(KERNEL_SERVER)
intran: vm_address_t convert_vm_from_user(rpc_vm_address_t)
@@ -128,7 +130,7 @@ type vm_address_t = rpc_vm_size_t
ctype: rpc_vm_address_t
#endif
;
-type vm_offset_t = rpc_vm_size_t
+type vm_offset_t = rpc_vm_offset_t
#if defined(KERNEL_SERVER)
intran: vm_offset_t convert_vm_from_user(rpc_vm_offset_t)
outtran: rpc_vm_offset_t convert_vm_to_user(vm_offset_t)