This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need to replicate TIOCGICOUNT and TIOCMIWAIT on cygwin


On Tue, 27 Apr 2004, Jim Brain wrote:

> I have an application that I need to port to windows, and it uses these two
> Linux IOCTLs.  Specifically, the app needs to monitor the DSR line and signal
> another process when it changes.

What kind of response time do you need?  You could poll it with a TIOCMGET
and a small sleep (2 ms is the shortest sleep available via Cygwin).

> I have migrated the rest of the app over with minimal work, but obviously
> cygwin does not support linux/serial.h.  I am OK with a rewrite of this
> function (the rest is working fine), and am also OK writing it in straight
> Win32 calls, but I don't know how to relate my opened fd with a HANDLE to use
> the relevant WIN32 calls.

To eliminate this problem, why not add it to Cygwin and contribute it?
See http://cygwin.com/contrib.html for more details.

On the other hand, a patch to provide this hook might be accepted.  The
details above still apply, though.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]