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