From owner-freebsd-hackers Mon Oct 23 14:03:53 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id OAA27618 for hackers-outgoing; Mon, 23 Oct 1995 14:03:53 -0700 Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id OAA27608 for ; Mon, 23 Oct 1995 14:03:47 -0700 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA11710; Mon, 23 Oct 1995 13:55:47 -0700 From: Terry Lambert Message-Id: <199510232055.NAA11710@phaeton.artisoft.com> Subject: Re: What is the best way... To: joerg_wunsch@uriah.heep.sax.de Date: Mon, 23 Oct 1995 13:55:47 -0700 (MST) 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] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 675 Sender: owner-hackers@FreeBSD.ORG Precedence: bulk > 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. So use a hash and do ordered inserts into the timer queue using one-behind delta's and timer markers for canceled timeouts so they don't throw off the timeouts that follow them. Then the walk list is very abbreviated. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.