home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17245 < prev    next >
Encoding:
Text File  |  1992-12-11  |  1.8 KB  |  40 lines

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