xref: /illumos-gate/usr/src/compat/bhyve/sys/types.h (revision 5103e761)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2014 Pluribus Networks Inc.
14  * Copyright 2018 Joyent, Inc.
15  */
16 
17 #ifndef _COMPAT_FREEBSD_SYS_TYPES_H_
18 #define	_COMPAT_FREEBSD_SYS_TYPES_H_
19 
20 #include <sys/_types.h>
21 
22 typedef __uint8_t	u_int8_t;	/* unsigned integrals (deprecated) */
23 typedef __uint16_t	u_int16_t;
24 typedef __uint32_t	u_int32_t;
25 typedef __uint64_t	u_int64_t;
26 
27 #ifndef	__REGISTER_T_DEFINED
28 #define	__REGISTER_T_DEFINED
29 typedef __register_t	register_t;
30 #endif
31 
32 #ifndef	__VM_MEMATTR_T_DEFINED
33 #define	__VM_MEMATTR_T_DEFINED
34 typedef char	vm_memattr_t;
35 #endif
36 
37 #ifndef	__VM_OFFSET_T_DEFINED
38 #define	__VM_OFFSET_T_DEFINED
39 typedef __vm_offset_t	vm_offset_t;
40 #endif
41 
42 #ifndef	__VM_OOFFSET_T_DEFINED
43 #define	__VM_OOFFSET_T_DEFINED
44 typedef __vm_ooffset_t	vm_ooffset_t;
45 #endif
46 
47 #ifndef	__VM_PADDR_T_DEFINED
48 #define	__VM_PADDR_T_DEFINED
49 typedef __vm_paddr_t	vm_paddr_t;
50 #endif
51 
52 #ifndef	__VM_PINDEX_T_DEFINED
53 #define	__VM_PINDEX_T_DEFINED
54 typedef __uint64_t	vm_pindex_t;
55 #endif
56 
57 #ifndef	__VM_SIZE_T_DEFINED
58 #define	__VM_SIZE_T_DEFINED
59 typedef __vm_size_t	vm_size_t;
60 #endif
61 
62 #ifndef	__VM_MEMATTR_T_DEFINED
63 #define	__VM_MEMATTR_T_DEFINED
64 typedef char		vm_memattr_t;
65 #endif
66 
67 #ifndef	__bool_true_false_are_defined
68 #define	__bool_true_false_are_defined	1
69 #define	false	0
70 #define	true	1
71 typedef _Bool bool;
72 #endif
73 
74 #if defined(_KERNEL)
75 typedef struct __dev_info **device_t;
76 #endif
77 
78 #include_next <sys/types.h>
79 
80 #endif	/* _COMPAT_FREEBSD_SYS_TYPES_H_ */
81