static __inline quad_t qmin(quad_t a, quad_t b) { return (a < b ? a : b); }
static __inline u_long ulmax(u_long a, u_long b) { return (a > b ? a : b); }
static __inline u_long ulmin(u_long a, u_long b) { return (a < b ? a : b); }
+static __inline size_t szmax(size_t a, size_t b) { return (a > b ? a : b); }
+static __inline size_t szmin(size_t a, size_t b) { return (a < b ? a : b); }
/* swaps (undocumented, useful?) */
#ifdef __i386__
#define _CPU_TYPES_H_
#if defined(__amd64__)
-typedef __uint64_t vm_offset_t; /* address space bounded offset */
-typedef __uint64_t vm_size_t; /* address space bounded size */
-typedef __uint64_t vm_pindex_t; /* physical page index */
typedef __int64_t __segsz_t; /* segment size */
typedef __int64_t register_t;
typedef __uint64_t u_register_t;
#elif defined(__i386__)
-typedef unsigned int vm_offset_t; /* address space bounded offset */
-typedef unsigned int vm_size_t; /* address space bounded size */
-typedef unsigned int vm_pindex_t; /* physical page index */
typedef __int32_t __segsz_t; /* segment size */
typedef __int32_t register_t;
typedef __uint32_t u_register_t;
#endif
+typedef unsigned long vm_offset_t; /* address space bounded offset */
+typedef unsigned long vm_size_t; /* address space bounded size */
+typedef unsigned long vm_pindex_t; /* physical page index */
+
typedef __int64_t vm_ooffset_t; /* VM object bounded offset */
typedef __uint64_t vm_poff_t; /* physical offset */
typedef __uint64_t vm_paddr_t; /* physical addr (same as vm_poff_t) */
#include <machine/stdint.h>
#endif
-typedef unsigned int vm_offset_t; /* address space bounded offset */
-typedef unsigned int vm_size_t; /* address space bounded size */
+typedef unsigned long vm_offset_t; /* address space bounded offset */
+typedef unsigned long vm_size_t; /* address space bounded size */
typedef __int64_t vm_ooffset_t; /* VM object bounded offset */
-typedef unsigned int vm_pindex_t; /* physical page index */
+typedef unsigned long vm_pindex_t; /* physical page index */
typedef __uint64_t vm_poff_t; /* physical offset */
typedef __uint64_t vm_paddr_t; /* physical addr (same as vm_poff_t) */
static __inline u_int64_t u64min(u_int64_t a, u_int64_t b) { return (a < b ? a : b); }
static __inline int64_t i64max(int64_t a, int64_t b) { return (a > b ? a : b); }
static __inline int64_t i64min(int64_t a, int64_t b) { return (a < b ? a : b); }
+static __inline size_t szmax(size_t a, size_t b) { return (a > b ? a : b); }
+static __inline size_t szmin(size_t a, size_t b) { return (a < b ? a : b); }
/* Prototypes for non-quad routines. */