From owner-freebsd-hackers Sun Jan 3 19:28:47 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA15284 for freebsd-hackers-outgoing; Sun, 3 Jan 1999 19:28:47 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA15279 for ; Sun, 3 Jan 1999 19:28:45 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id TAA26843; Sun, 3 Jan 1999 19:21:10 -0800 (PST) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpdf26841; Mon Jan 4 03:21:08 1999 Date: Sun, 3 Jan 1999 19:21:05 -0800 (PST) From: Julian Elischer To: Mohit Aron cc: freebsd-hackers@FreeBSD.ORG Subject: Re: fine-grained timers In-Reply-To: <199901031742.LAA21838@cs.rice.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG You should use the calls acquire_timer0() and release_timer0() which are found in /sys/i386/isa/clock.c They allow you to change the underlying hardware clock frequency to a multiple of "hz" (usually 100 Hz) nad still have the system act as if the hardware were running at 'hz'. On each real h/w clock interrupt your nominated function is called. the pcaudio driver (i386/isa/pcaudio.c) uses this tu run teh hardware clock at 16000Hz which is faster than you require. Unfortunatly only one higher speed can be used at a time (of course!). On Sun, 3 Jan 1999, Mohit Aron wrote: > Hi, > I'm using FreeBSD-2.2.6. I want to make FreeBSD generate timer > interrupts with a granularity as fine as 100usecs. Since the hardclock() > operates at a 10ms granularity, its not of much use. I also want to disable > dynamically the fine-grained interrupts, so I don't want to simply modify the > granularity at which hardclock gets called. Can someone > suggest the functions or places in the kernel which I should modify to > register my own interrupt handler. Thanks, > > > > - Mohit > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message