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