From owner-freebsd-hackers Mon Oct 21 22:19:11 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96B3237B401 for ; Mon, 21 Oct 2002 22:19:10 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id B451A43E4A for ; Mon, 21 Oct 2002 22:19:08 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id g9M5J4pk088665; Mon, 21 Oct 2002 23:19:05 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 21 Oct 2002 23:18:50 -0600 (MDT) Message-Id: <20021021.231850.121892484.imp@bsdimp.com> To: rizzo@icir.org Cc: dchrist@cox.net, hackers@FreeBSD.ORG Subject: Re: Scheduling a recurring task in a device driver From: "M. Warner Losh" In-Reply-To: <20021021092312.D18652@carp.icir.org> References: <20021021092312.D18652@carp.icir.org> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20021021092312.D18652@carp.icir.org> Luigi Rizzo writes: : On Mon, Oct 21, 2002 at 09:20:52AM -0700, David Christensen wrote: : > A device driver I'm porting from Linux uses tasklets to schedule a : > recurring : > event to work around a hardware bug. What would be the equivalent in : > FreeBSD? : : a timeout() call will do (at most once per tick). grep for "timeout(" : in most of device drivers to see how to use it. Also, A software interrupt would be good too, depending on the nature of the recurring event. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message