From owner-freebsd-hackers Wed Nov 4 10:31:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA07218 for freebsd-hackers-outgoing; Wed, 4 Nov 1998 10:31:40 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA07212; Wed, 4 Nov 1998 10:31:37 -0800 (PST) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id LAA00928; Wed, 4 Nov 1998 11:31:28 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp03.primenet.com, id smtpd000907; Wed Nov 4 11:31:23 1998 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id LAA09360; Wed, 4 Nov 1998 11:31:22 -0700 (MST) From: Terry Lambert Message-Id: <199811041831.LAA09360@usr07.primenet.com> Subject: Re: waiting in device driver To: Etienne.Debruin@KryptoKom.DE (Etienne de Bruin) Date: Wed, 4 Nov 1998 18:31:22 +0000 (GMT) Cc: freebsd-hackers@FreeBSD.ORG, questions@FreeBSD.ORG In-Reply-To: <199811041416.PAA04355@borg.kryptokom.de> from "Etienne de Bruin" at Nov 4, 98 03:16:24 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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? Use tsleep. You do not want to buzz-loop on a condition variable, since it would prevent the processor from doing other useful work while your device was busy. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message