🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2
Article #1179

Re: Has Anyone Seen A Lazy Write Queue Implementation Using Threads For

#1179
From: Jim Gilliland
Date: Fri, 02 Feb 1990 12:30
29 lines
1912 bytes
 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...
Technical Details
Message-ID: <479.25CC1F8F@weyr.FIDONET.ORG>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!ubc-cs!alberta!dvinci!weyr!p34.f200.n157.z1.FIDONET.ORG!Jim.Gilliland

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!ubc-cs!alberta!dvinci!weyr!p34.f200.n157.z1.FIDONET.ORG!Jim.Gilliland
From: Jim.Gilliland@p34.f200.n157.z1.FIDONET.ORG (Jim Gilliland)
Newsgroups: comp.os.os2
Subject: Re: Has Anyone Seen A Lazy Write Queue Implementation Using Threads For
Message-ID: <479.25CC1F8F@weyr.FIDONET.ORG>
Date: 2 Feb 90 12:30:51 GMT
Sender: ufgate@weyr.FIDONET.ORG (newsout1.26)
Organization: FidoNet node 1:157/200.34 - PC-OHIO II HST, Cleveland OH
Lines: 29