aboutsummaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
Diffstat (limited to 'i386')
-rwxr-xr-xi386/include/mach/i386/machine_types.defs14
-rw-r--r--i386/include/mach/i386/vm_types.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/i386/include/mach/i386/machine_types.defs b/i386/include/mach/i386/machine_types.defs
index dfbc521e..0e94999b 100755
--- a/i386/include/mach/i386/machine_types.defs
+++ b/i386/include/mach/i386/machine_types.defs
@@ -59,6 +59,20 @@ type natural_t = uint32_t;
type integer_t = int32_t;
/*
+ * unsigned long for kernel <-> userland interfaces size depends on the architecture
+ * of both kernel and userland.
+ */
+#if defined(KERNEL) && defined(USER32)
+type rpc_unsigned_long = uint32_t;
+#else /* KERNEL and USER32 */
+#if defined(__x86_64__)
+type rpc_unsigned_long = uint64_t;
+#else /* __x86_64__ */
+type rpc_unsigned_long = uint32_t;
+#endif /* __x86_64__ */
+#endif /* KERNEL_SERVER and USER32 */
+
+/*
* Physical address size
*/
type rpc_phys_addr_t = uint64_t;
diff --git a/i386/include/mach/i386/vm_types.h b/i386/include/mach/i386/vm_types.h
index 7a43d75d..9daaa15e 100644
--- a/i386/include/mach/i386/vm_types.h
+++ b/i386/include/mach/i386/vm_types.h
@@ -116,12 +116,14 @@ static inline __mach_uint32_t convert_vm_to_user(__mach_uint64_t kaddr)
assert(kaddr <= 0xFFFFFFFF);
return (__mach_uint32_t)kaddr;
}
+typedef __mach_uint32_t rpc_unsigned_long;
#else /* MACH_KERNEL */
typedef vm_offset_t rpc_vm_address_t;
typedef vm_offset_t rpc_vm_offset_t;
typedef vm_size_t rpc_vm_size_t;
#define convert_vm_to_user null_conversion
#define convert_vm_from_user null_conversion
+typedef unsigned long rpc_unsigned_long;
#endif /* MACH_KERNEL */
#endif /* __ASSEMBLER__ */