| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Serial I/O |
CM> simply have the DosRead return
CM> only when there's a character. It just smacks
...
CM> Is there another way?
DL> The following function will return the number of
DL> bytes in the input buffer. Keep on calling in_ready
DL> until you read a non-zero value, then read the
DL> character.
That's exactly what Chris is trying to get away from - busy waiting.
What he's looking for is a way to disable timeouts (i.e. an infinite
timeout) so that he doesn't need to occasionally spend processor time when
there's no input arriving (i.e. after sucessive timeouts). What you're
suggesting wastes cpu time - spinning in a loop calling in_ready while
nothing is being done is a bad thing to do: it robs other threads/tasks of
processor time, and severly affects performance.
--- Maximus/2 2.01
* Origin: Sol 3 * Toronto * V.32 * (905)858-8488 (1:259/414)SEEN-BY: 12/2442 54/54 620/243 624/102 632/348 640/820 690/660 711/409 413 SEEN-BY: 711/430 807 808 809 934 942 712/353 623 713/888 800/1 @PATH: 259/414 400 99 98 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.