Date: Wed, 5 Dec 2012 23:37:52 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r243917 - projects/bpfjit/sys/contrib/sljit Message-ID: <201212052337.qB5Nbq28008319@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Wed Dec 5 23:37:52 2012 New Revision: 243917 URL: http://svnweb.freebsd.org/changeset/base/243917 Log: Make it buildable for FreeBSD kernel. Modified: projects/bpfjit/sys/contrib/sljit/sljitConfig.h (contents, props changed) Modified: projects/bpfjit/sys/contrib/sljit/sljitConfig.h ============================================================================== --- projects/bpfjit/sys/contrib/sljit/sljitConfig.h Wed Dec 5 23:32:34 2012 (r243916) +++ projects/bpfjit/sys/contrib/sljit/sljitConfig.h Wed Dec 5 23:37:52 2012 (r243917) @@ -22,6 +22,8 @@ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _SLJIT_CONFIG_H_ @@ -34,6 +36,27 @@ /* Put your custom defines here. This empty section will never change which helps maintaining patches (with diff / patch utilities). */ +#ifdef _KERNEL +#include <sys/malloc.h> +#include <sys/systm.h> + +#define SLJIT_CALL +#define SLJIT_CONFIG_AUTO 1 +#define SLJIT_DEBUG 0 +#define SLJIT_EXECUTABLE_ALLOCATOR 0 +#define SLJIT_STD_MACROS_DEFINED 1 +#define SLJIT_SINGLE_THREADED 1 +#define SLJIT_UTIL_STACK 0 +#define SLJIT_VERBOSE 0 + +#define SLJIT_FREE(ptr) free(ptr, M_TEMP) +#define SLJIT_FREE_EXEC(ptr) free(ptr, M_TEMP) +#define SLJIT_MALLOC(size) malloc(size, M_TEMP, M_NOWAIT) +#define SLJIT_MALLOC_EXEC(size) malloc(size, M_TEMP, M_NOWAIT) +#define SLJIT_MEMMOVE(dest, src, len) bcopy(src, dest, len) +#define SLJIT_ZEROMEM(dest, len) bzero(dest, len) +#endif + /* --------------------------------------------------------------------- */ /* Architecture */ /* --------------------------------------------------------------------- */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212052337.qB5Nbq28008319>