xref: /illumos-gate/usr/src/compat/bhyve/sys/kernel.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 2013 Pluribus Networks Inc.
144c87aefeSPatrick Mooney  * Copyright 2018 Joyent, Inc.
15bf21cd93STycho Nightingale  */
16bf21cd93STycho Nightingale 
17bf21cd93STycho Nightingale #ifndef _COMPAT_FREEBSD_SYS_KERNEL_H_
18bf21cd93STycho Nightingale #define	_COMPAT_FREEBSD_SYS_KERNEL_H_
19bf21cd93STycho Nightingale 
204c87aefeSPatrick Mooney #define	TUNABLE_INT_FETCH(path, var)
21bf21cd93STycho Nightingale 
22bf21cd93STycho Nightingale #include <sys/linker_set.h>
23bf21cd93STycho Nightingale 
244c87aefeSPatrick Mooney typedef void (*sysinit_func_t)(const void *);
254c87aefeSPatrick Mooney 
264c87aefeSPatrick Mooney struct sysinit {
274c87aefeSPatrick Mooney 	const sysinit_func_t func;
284c87aefeSPatrick Mooney 	const void *data;
294c87aefeSPatrick Mooney };
304c87aefeSPatrick Mooney 
314c87aefeSPatrick Mooney #define	SYSINIT(uniquifier, subsystem, order, func, ident) \
324c87aefeSPatrick Mooney 	static struct sysinit uniquifier ## _sys_init = {  \
334c87aefeSPatrick Mooney 		(const sysinit_func_t)func,		   \
344c87aefeSPatrick Mooney 		(const void *)&(ident)			   \
354c87aefeSPatrick Mooney 	};						   \
364c87aefeSPatrick Mooney 	DATA_SET(sysinit_set, uniquifier ## _sys_init);
374c87aefeSPatrick Mooney 
384c87aefeSPatrick Mooney extern void sysinit(void);
394c87aefeSPatrick Mooney 
40bf21cd93STycho Nightingale #define	ticks	ddi_get_lbolt()
41bf21cd93STycho Nightingale 
42bf21cd93STycho Nightingale #endif	/* _COMPAT_FREEBSD_SYS_KERNEL_H_ */