xref: /illumos-gate/usr/src/compat/bhyve/sys/systm.h (revision d0b3c59b)
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  */
15 
16 #ifndef _COMPAT_FREEBSD_SYS_SYSTM_H_
17 #define	_COMPAT_FREEBSD_SYS_SYSTM_H_
18 
19 #include <machine/atomic.h>
20 #include <machine/cpufunc.h>
21 #include <sys/callout.h>
22 #include <sys/queue.h>
23 
24 struct mtx;
25 
26 #define	KASSERT(exp,msg) do {						\
27 	if (!(exp))							\
28 		panic msg;						\
29 } while (0)
30 
31 void	critical_enter(void);
32 void	critical_exit(void);
33 
34 struct unrhdr *new_unrhdr(int low, int high, struct mtx *mutex);
35 void delete_unrhdr(struct unrhdr *uh);
36 int alloc_unr(struct unrhdr *uh);
37 void free_unr(struct unrhdr *uh, u_int item);
38 
39 #include <sys/libkern.h>
40 
41 #include_next <sys/systm.h>
42 #include <sys/cmn_err.h>
43 
44 #endif	/* _COMPAT_FREEBSD_SYS_SYSTM_H_ */
45