kern_hhook.c (220560) | kern_hhook.c (220592) |
---|---|
1/*- 2 * Copyright (c) 2010 Lawrence Stewart <lstewart@freebsd.org> 3 * Copyright (c) 2010 The FreeBSD Foundation 4 * All rights reserved. 5 * 6 * This software was developed by Lawrence Stewart while studying at the Centre 7 * for Advanced Internet Architectures, Swinburne University of Technology, 8 * made possible in part by grants from the FreeBSD Foundation and Cisco --- 21 unchanged lines hidden (view full) --- 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2010 Lawrence Stewart <lstewart@freebsd.org> 3 * Copyright (c) 2010 The FreeBSD Foundation 4 * All rights reserved. 5 * 6 * This software was developed by Lawrence Stewart while studying at the Centre 7 * for Advanced Internet Architectures, Swinburne University of Technology, 8 * made possible in part by grants from the FreeBSD Foundation and Cisco --- 21 unchanged lines hidden (view full) --- 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/kern_hhook.c 220560 2011-04-12 08:13:18Z lstewart $"); | 38__FBSDID("$FreeBSD: head/sys/kern/kern_hhook.c 220592 2011-04-13 11:28:46Z pluknet $"); |
39 40#include <sys/param.h> 41#include <sys/kernel.h> 42#include <sys/hhook.h> 43#include <sys/khelp.h> 44#include <sys/malloc.h> 45#include <sys/module.h> 46#include <sys/module_khelp.h> --- 6 unchanged lines hidden (view full) --- 53 54struct hhook { 55 hhook_func_t hhk_func; 56 struct helper *hhk_helper; 57 void *hhk_udata; 58 STAILQ_ENTRY(hhook) hhk_next; 59}; 60 | 39 40#include <sys/param.h> 41#include <sys/kernel.h> 42#include <sys/hhook.h> 43#include <sys/khelp.h> 44#include <sys/malloc.h> 45#include <sys/module.h> 46#include <sys/module_khelp.h> --- 6 unchanged lines hidden (view full) --- 53 54struct hhook { 55 hhook_func_t hhk_func; 56 struct helper *hhk_helper; 57 void *hhk_udata; 58 STAILQ_ENTRY(hhook) hhk_next; 59}; 60 |
61MALLOC_DECLARE(M_HHOOK); 62MALLOC_DEFINE(M_HHOOK, "hhook", "Helper hooks are linked off hhook_head lists"); | 61static MALLOC_DEFINE(M_HHOOK, "hhook", "Helper hooks are linked off hhook_head lists"); |
63 64LIST_HEAD(hhookheadhead, hhook_head); 65VNET_DEFINE(struct hhookheadhead, hhook_head_list); 66#define V_hhook_head_list VNET(hhook_head_list) 67 68static struct mtx hhook_head_list_lock; 69MTX_SYSINIT(hhookheadlistlock, &hhook_head_list_lock, "hhook_head list lock", 70 MTX_DEF); --- 385 unchanged lines hidden --- | 62 63LIST_HEAD(hhookheadhead, hhook_head); 64VNET_DEFINE(struct hhookheadhead, hhook_head_list); 65#define V_hhook_head_list VNET(hhook_head_list) 66 67static struct mtx hhook_head_list_lock; 68MTX_SYSINIT(hhookheadlistlock, &hhook_head_list_lock, "hhook_head list lock", 69 MTX_DEF); --- 385 unchanged lines hidden --- |