Date: Fri, 19 Mar 2010 19:51:03 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/kern subr_eventhandler.c src/sys/net vnet.c vnet.h src/sys/sys eventhandler.h Message-ID: <201003191951.o2JJpoMw065263@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bz 2010-03-19 19:51:03 UTC FreeBSD src repository Modified files: sys/kern subr_eventhandler.c sys/net vnet.c vnet.h sys/sys eventhandler.h Log: SVN rev 205345 on 2010-03-19 19:51:03Z by bz 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. Sponsored by: ISPsystem Discussed with: jhb Reviewed by: zec (earlier version), jhb MFC after: 1 month Revision Changes Path 1.26 +54 -17 src/sys/kern/subr_eventhandler.c 1.14 +39 -0 src/sys/net/vnet.c 1.30 +30 -0 src/sys/net/vnet.h 1.47 +16 -0 src/sys/sys/eventhandler.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003191951.o2JJpoMw065263>