delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/27/12:41:21

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 27 Apr 2004 11:40:15 -0500
From: Brian Ford <ford AT vss DOT fsi DOT com>
Reply-To: cygwin AT cygwin DOT com
To: Jim Brain <brain AT jbrain DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Need to replicate TIOCGICOUNT and TIOCMIWAIT on cygwin
In-Reply-To: <loom.20040427T053617-292@post.gmane.org>
Message-ID: <Pine.CYG.4.58.0404271133030.5560@fordpc.vss.fsi.com>
References: <loom DOT 20040427T053617-292 AT post DOT gmane DOT org>
MIME-Version: 1.0
X-IsSubscribed: yes

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019