This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Need to replicate TIOCGICOUNT and TIOCMIWAIT on cygwin
- From: Brian Ford <ford at vss dot fsi dot com>
- To: Jim Brain <brain at jbrain dot com>
- Cc: cygwin at cygwin dot com
- Date: Tue, 27 Apr 2004 11:40:15 -0500
- Subject: Re: Need to replicate TIOCGICOUNT and TIOCMIWAIT on cygwin
- References: <loom.20040427T053617-292@post.gmane.org>
- Reply-to: cygwin at cygwin dot com
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/