From owner-freebsd-hackers Tue Apr 18 01:45:15 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id BAA24945 for hackers-outgoing; Tue, 18 Apr 1995 01:45:15 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id BAA24925 for ; Tue, 18 Apr 1995 01:44:58 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id SAA13096; Tue, 18 Apr 1995 18:40:44 +1000 Date: Tue, 18 Apr 1995 18:40:44 +1000 From: Bruce Evans Message-Id: <199504180840.SAA13096@godzilla.zeta.org.au> To: chitra@CS.SunySB.EDU, freebsd-hackers@FreeBSD.org Subject: Re: help with timeouts Sender: hackers-owner@FreeBSD.org Precedence: bulk >I am developing a token bus protocol in the FreeBSD network >interrupt handler. For the >token recovery algorithm that I have, I need to set microsecond >timeouts (they could be off by upto 500 u_sec and still serve my purpose). >As things are now, I can only set timeouts in multiples of 10 millisec. >Can you please tell me how I can implement u_sec timeouts ? acquire_timer0(your_interrupt_rate, your_interrupt_handler) is suitable for high frequency periodic timeouts (preferably a multiple of 100 Hz), but only works if another driver hasn't already `acquired' the timer. acquire_timer0() was nontrivial to implement (see clkintr() in clock.c) and a general aperiodic timer would be harder. Bruce