Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Jan 1999 19:21:05 -0800 (PST)
From:      Julian Elischer <julian@whistle.com>
To:        Mohit Aron <aron@cs.rice.edu>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: fine-grained timers
Message-ID:  <Pine.BSF.3.95.990103191435.29200E-100000@current1.whistle.com>
In-Reply-To: <199901031742.LAA21838@cs.rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.990103191435.29200E-100000>