From owner-freebsd-hackers Mon Oct 23 08:50:47 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id IAA11250 for hackers-outgoing; Mon, 23 Oct 1995 08:50:47 -0700 Received: from hda.com (hda.com [199.232.40.182]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id IAA11235 for ; Mon, 23 Oct 1995 08:50:42 -0700 Received: (from dufault@localhost) by hda.com (8.6.11/8.6.9) id HAA26347; Mon, 23 Oct 1995 07:54:24 -0400 From: Peter Dufault Message-Id: <199510231154.HAA26347@hda.com> Subject: Re: What is the best way... To: joerg_wunsch@uriah.heep.sax.de Date: Mon, 23 Oct 1995 07:54:24 -0400 (EDT) Cc: freebsd-hackers@freebsd.org In-Reply-To: <199510221818.TAA03456@uriah.heep.sax.de> from "J Wunsch" at Oct 22, 95 07:18:55 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1178 Sender: owner-hackers@freebsd.org Precedence: bulk > > ...to implement something similar to the xxx_poll() driver entry > points in SysV? > > For those whod don't know, these entries are supposed to be called on > each clock tick (at spl6, i think this is `soft clock'), and they are > useful for devices that lose interrupts, or that don't even have an > interrupt of its own. > > The closest thing one could do (besides from the approach e.g. > pcaudio is using, which i consider being overkill as a poll() > replacement) were to continuously re-issue yet another timeout on each > clock tick. However, since that would cause timeout() to walk the > entire timer queue, it's rather expensive. The special case of calling the function at every tick that you specify will be nice and fast, since timeout() only must adjust the tick delta based on those functions that will be called before the one you are installing is to be called. Fortunately, the faster the ticks are the less time is spent hunting through the queue for the insertion point. Peter -- Peter Dufault Real Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267