From owner-freebsd-hackers Wed Nov 4 06:53:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA06272 for freebsd-hackers-outgoing; Wed, 4 Nov 1998 06:53:14 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mrelay.jrc.it (mrelay.jrc.it [139.191.1.65]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA06260 for ; Wed, 4 Nov 1998 06:53:09 -0800 (PST) (envelope-from nick.hibma@jrc.it) Received: from elect8 (elect8.jrc.it [139.191.71.152]) by mrelay.jrc.it (LMC5692) with SMTP id PAA11221; Wed, 4 Nov 1998 15:52:37 +0100 (MET) Date: Wed, 4 Nov 1998 15:52:36 +0100 (MET) From: Nick Hibma X-Sender: n_hibma@elect8 Reply-To: Nick Hibma To: Luigi Rizzo cc: Etienne.Debruin@KryptoKom.DE, FreeBSD hackers mailing list Subject: Re: waiting in device driver In-Reply-To: <199811041219.NAA18582@labinfo.iet.unipi.it> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 4 Nov 1998, Luigi Rizzo wrote: > > which is the best way to wait for the DMA routines of a card to complete? > > should one go in a while loop and test a flag (which gets set by the > > interrupt handler once completed) or should i go for the tsleep option? > > do you need to ask ??? On the scale of one to $stupid, this answer scores fairly $stupid. The answer might be (but then again I haven't followed the thread): In Linux you would, yes. In FreeBSD, if you expect that the delay would be more than a couple of microseconds, you would call tsleep, see man tsleep Cheers, Nick Loose'95: USB mouse installation: 2 hours, 5 reboots and no joy. FreeBSD: RAID array installation: 10 minutes, 0 reboots and lots. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message