From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 21 08:54:17 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CBB116A418 for ; Wed, 21 Nov 2007 08:54:17 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id DECDF13C43E for ; Wed, 21 Nov 2007 08:54:16 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lAL8sDw0008022 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Nov 2007 19:54:14 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.1/8.14.1) with ESMTP id lAL8sCMU051233; Wed, 21 Nov 2007 19:54:12 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.1/8.14.1/Submit) id lAL8sClp051232; Wed, 21 Nov 2007 19:54:12 +1100 (EST) (envelope-from peter) Date: Wed, 21 Nov 2007 19:54:12 +1100 From: Peter Jeremy To: Michiel Overtoom Message-ID: <20071121085412.GM50167@server.vk2pj.dyndns.org> References: <200711200051.45420.michiel@motoom.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mojUlQ0s9EVzWg2t" Content-Disposition: inline In-Reply-To: <200711200051.45420.michiel@motoom.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hackers@freebsd.org Subject: Re: Hooking a kernelmodule-function into a timer interrupt X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2007 08:54:17 -0000 --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 20, 2007 at 12:51:45AM +0100, Michiel Overtoom wrote: >second. If would be nice if it gets called at the kern.clockrate. I have= no=20 >clear idea how to proceed, I suspect I have to install a pointer to my=20 >conversion function into some list of functions which get called each cloc= k=20 >tick, but I don't know where, or how. Any tips would be very welcome. I presume that the exact rate is not critical. My suggestion would be to create a kernel thread (see kthread(9)) that uses a callout (see timeout(9)) to wake it every tick. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --mojUlQ0s9EVzWg2t Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHQ/I0/opHv/APuIcRAiV8AJ4lACTlkygljcbnETwHVwJ80abI3ACdHwvP aAVJvIGCdkjebPOEaMXr2SU= =td4p -----END PGP SIGNATURE----- --mojUlQ0s9EVzWg2t--