Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Nov 1998 18:31:22 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        Etienne.Debruin@KryptoKom.DE (Etienne de Bruin)
Cc:        freebsd-hackers@FreeBSD.ORG, questions@FreeBSD.ORG
Subject:   Re: waiting in device driver
Message-ID:  <199811041831.LAA09360@usr07.primenet.com>
In-Reply-To: <199811041416.PAA04355@borg.kryptokom.de> from "Etienne de Bruin" at Nov 4, 98 03:16:24 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811041831.LAA09360>