xref: /illumos-gate/usr/src/compat/bhyve/sys/kernel.h (revision 1a2d662a91cee3bf82f41cd47c7ae6f3825d9db2)
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 2013 Pluribus Networks Inc.
14  * Copyright 2018 Joyent, Inc.
15  */
16 
17 #ifndef _COMPAT_FREEBSD_SYS_KERNEL_H_
18 #define	_COMPAT_FREEBSD_SYS_KERNEL_H_
19 
20 #define	TUNABLE_INT_FETCH(path, var)
21 
22 #include <sys/linker_set.h>
23 
24 typedef void (*sysinit_func_t)(const void *);
25 
26 struct sysinit {
27 	const sysinit_func_t func;
28 	const void *data;
29 };
30 
31 #define	SYSINIT(uniquifier, subsystem, order, func, ident) \
32 	static struct sysinit uniquifier ## _sys_init = {  \
33 		(const sysinit_func_t)func,		   \
34 		(const void *)&(ident)			   \
35 	};						   \
36 	DATA_SET(sysinit_set, uniquifier ## _sys_init);
37 
38 extern void sysinit(void);
39 
40 #define	ticks	ddi_get_lbolt()
41 
42 #endif	/* _COMPAT_FREEBSD_SYS_KERNEL_H_ */
43