Chris.Laforet@p0.f402.n151.z1.FIDONET.ORG (Chris Laforet) (01/31/90)
In a message to Ralph Yozzo <01-29-90 10:09> Jim Gilliland wrote: " There's no simple way to do this because there is no way to " get the COM device driver to tell you when its queue is " empty. You can get reasonably good COM device Yes you can using the ASYNC_GETCOMMEVENT DosDevIOCtl call. You can check if the last character has been sent out of the hardware....see if this does what you want. -Chris -- Chris Laforet - via FidoNet node 1:140/22 UUCP: alberta!dvinci!weyr!151!402.0!Chris.Laforet Internet: Chris.Laforet@p0.f402.n151.z1.FIDONET.ORG Standard Disclaimers Apply...
Jim.Gilliland@p34.f200.n157.z1.FIDONET.ORG (Jim Gilliland) (02/02/90)
JG> " There's no simple way to do this because there is no way to JG> " get the COM device driver to tell you when its queue is JG> " empty. You can get reasonably good COM device CL> CL> Yes you can using the ASYNC_GETCOMMEVENT DosDevIOCtl call. You can CL> check ifthe last character has been sent out of the hardware....see if CL> this doeswhat you want. Do you mean category 1 function 72h? I assume that ASYNC_GETCOMMEVENT is in the Microsoft toolkit, since IBM doesn't use that name for it. This IOCtl call tells you if the buffer currently being sent by the driver has been completed, but it does not tell you if another write request is pending, so it doesn't really give you everything you need to know. More importantly, though, using this mechanism would imply polling it. This would be unacceptable, in my opinion. The mechanism that Ralph needs would be one that, say, cleared a semaphore when the driver had no more data to write. This would allow his code to block when the buffer was full, and be released when the driver was ready for more data - all without wasting CPU resources. Unfortunately, no such mechanism exists. -- Jim Gilliland - via FidoNet node 1:140/22 UUCP: alberta!dvinci!weyr!157!200.34!Jim.Gilliland Internet: Jim.Gilliland@p34.f200.n157.z1.FIDONET.ORG Standard Disclaimers Apply...