home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!haven.umd.edu!decuac!pa.dec.com!ninja!zowie.zso.dec.com!ridder
- From: ridder@zowie.zso.dec.com (Hans)
- Subject: Re: Serial port programming question
- Message-ID: <1992Dec11.201408.25777@ninja.zso.dec.com>
- Sender: news@ninja.zso.dec.com (USENET News System)
- Nntp-Posting-Host: zowie.zso.dec.com
- Organization: Digital Equipment Corporation - DECwest Engineering
- References: <4e3.ANN@peti.GUN.de> <1992Dec9.003218.24304@jato.jpl.nasa.gov> <jbickers.0l0k@templar.actrix.gen.nz>
- Date: Fri, 11 Dec 1992 20:14:08 GMT
- Lines: 27
-
- In article <jbickers.0l0k@templar.actrix.gen.nz> jbickers@templar.actrix.gen.nz (John Bickers) writes:
- >Quoted from <1992Dec9.003218.24304@jato.jpl.nasa.gov> by jdickson@jato.jpl.nasa.gov (Jeff Dickson):
- >
- >> How is querying the serial device at a fixed interval considered "busy-
- >> waiting" ? The way I once did it was to have the timer device signal me
- >
- > Because a lot of people consider polled IO and busy-waiting to be
- > the same thing, even though it isn't really "busy" waiting.
-
- Absolutly correct, John. It's not busy waiting, but it's still a waste
- of time.
-
- To the original poster (Jeff): Why wake up every so often and poll the
- serial port (or whatever) when there is a perfectly reasonable way to
- wake up your task *only* when data arrive? Also, if your application is
- likely to run with higher input speeds in the future, it's hard to know
- how often to poll. At some (high) polling speed, it'll be just as bad,
- or maybe even worse than busy waiting.
-
- >*** John Bickers, TAP. jbickers@templar.actrix.gen.nz ***
-
- -hans
- --
- Hans-Gabriel Ridder <ridder@rust.zso.dec.com>
- DECwest Engineering, Bellevue, Washington, USA
- "I'd rather be writing MACRO-20!"
- Any opinions expressed are not those of my employer, honest.
-