1270710Shselasky/*- 2270710Shselasky * Copyright (c) 2010 Isilon Systems, Inc. 3270710Shselasky * Copyright (c) 2010 iX Systems, Inc. 4270710Shselasky * Copyright (c) 2010 Panasas, Inc. 5270710Shselasky * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. 6270710Shselasky * All rights reserved. 7270710Shselasky * 8270710Shselasky * Redistribution and use in source and binary forms, with or without 9270710Shselasky * modification, are permitted provided that the following conditions 10270710Shselasky * are met: 11270710Shselasky * 1. Redistributions of source code must retain the above copyright 12270710Shselasky * notice unmodified, this list of conditions, and the following 13270710Shselasky * disclaimer. 14270710Shselasky * 2. Redistributions in binary form must reproduce the above copyright 15270710Shselasky * notice, this list of conditions and the following disclaimer in the 16270710Shselasky * documentation and/or other materials provided with the distribution. 17270710Shselasky * 18270710Shselasky * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19270710Shselasky * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20270710Shselasky * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21270710Shselasky * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22270710Shselasky * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23270710Shselasky * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24270710Shselasky * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25270710Shselasky * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26270710Shselasky * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27270710Shselasky * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28289644Shselasky * 29289644Shselasky * $FreeBSD: releng/11.0/sys/compat/linuxkpi/common/include/linux/kmod.h 290135 2015-10-29 08:28:39Z hselasky $ 30270710Shselasky */ 31270710Shselasky#ifndef _LINUX_KMOD_H_ 32270710Shselasky#define _LINUX_KMOD_H_ 33270710Shselasky 34270710Shselasky#include <sys/types.h> 35270710Shselasky#include <sys/syscallsubr.h> 36270710Shselasky#include <sys/refcount.h> 37270710Shselasky#include <sys/sbuf.h> 38270710Shselasky#include <machine/stdarg.h> 39270710Shselasky#include <sys/proc.h> 40270710Shselasky 41270710Shselasky#define request_module(...) \ 42270710Shselasky({\ 43270710Shselasky char modname[128]; \ 44270710Shselasky int fileid; \ 45270710Shselasky snprintf(modname, sizeof(modname), __VA_ARGS__); \ 46270710Shselasky kern_kldload(curthread, modname, &fileid); \ 47270710Shselasky}) 48270710Shselasky 49270710Shselasky#define request_module_nowait request_module 50270710Shselasky 51270710Shselasky 52270710Shselasky#endif /* _LINUX_KMOD_H_ */ 53