From owner-cvs-src-old@FreeBSD.ORG Wed Apr 21 19:46:38 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21558106564A for ; Wed, 21 Apr 2010 19:46:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0E7F68FC19 for ; Wed, 21 Apr 2010 19:46:37 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o3LJkbQw064917 for ; Wed, 21 Apr 2010 19:46:37 GMT (envelope-from bz@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o3LJkbVM064916 for cvs-src-old@freebsd.org; Wed, 21 Apr 2010 19:46:37 GMT (envelope-from bz@repoman.freebsd.org) Message-Id: <201004211946.o3LJkbVM064916@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to bz@repoman.freebsd.org using -f From: "Bjoern A. Zeeb" Date: Wed, 21 Apr 2010 19:45:41 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/sys/kern subr_eventhandler.c src/sys/net vnet.c vnet.h src/sys/sys eventhandler.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2010 19:46:38 -0000 bz 2010-04-21 19:45:41 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sys/kern subr_eventhandler.c sys/net vnet.c vnet.h sys/sys eventhandler.h Log: SVN rev 207010 on 2010-04-21 19:45:41Z by bz MFC r205345: Split eventhandler_register() into an internal part and a wrapper function that provides the allocated and setup eventhandler entry. Add a new wrapper for VIMAGE that allocates extra space to hold the callback function and argument in addition to an extra wrapper function. While the wrapper function goes as normal callback function the argument points to the extra space allocated holding the original func and arg that the wrapper function can then call. Provide an iterator function for the virtual network stack (vnet) that will call the callback function for each network stack. Provide a new set of macros for VNET that in the non-VIMAGE case will just call eventhandler_register() while in the VIMAGE case it will use vimage_eventhandler_register() passing in the extra iterator function but will only register once rather than per-vnet. We need a special macro in case we are interested in the tag returned as we must check for curvnet and can neither simply assign the return value, nor not change it in the non-vnet0 case without that. Discussed with: jhb Reviewed by: zec (earlier version), jhb Revision Changes Path 1.24.2.3 +54 -17 src/sys/kern/subr_eventhandler.c 1.8.2.7 +39 -0 src/sys/net/vnet.c 1.25.2.6 +30 -0 src/sys/net/vnet.h 1.45.2.2 +16 -0 src/sys/sys/eventhandler.h