From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32287 invoked by alias); 21 Apr 2005 21:01:56 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32209 invoked from network); 21 Apr 2005 21:01:49 -0000 Received: from unknown (HELO cgf.cx) (66.30.17.189) by sourceware.org with SMTP; 21 Apr 2005 21:01:49 -0000 Received: by cgf.cx (Postfix, from userid 201) id 7768E13C95B; Thu, 21 Apr 2005 17:01:49 -0400 (EDT) Date: Thu, 21 Apr 2005 21:01:00 -0000 From: Christopher Faylor To: gdb-patches@sources.redhat.com Subject: Re: PATCH: Support Windows in event-loop.c Message-ID: <20050421210149.GC6232@trixie.casa.cgf.cx> Mail-Followup-To: gdb-patches@sources.redhat.com References: <200504210549.j3L5n2nP027728@sirius.codesourcery.com> <01c546a1$Blat.v2.4$e03250c0@zahav.net.il> <4267F742.2090108@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4267F742.2090108@codesourcery.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00261.txt.bz2 On Thu, Apr 21, 2005 at 11:56:02AM -0700, Mark Mitchell wrote: >Eli Zaretskii wrote: >>Is it perhaps possible to write an emulation of `select' that would >>handle file handles as well > >Well, Cygwin has select, so it is *possible*. But, it's not easy, and >it doesn't really map terribly well onto what Windows provides. cygwin's select is pretty complicated but most of that is due to thread safety considerations. If there are only a limited number of types of devices being selected, it should be possible to mock something up without only marginal pain. What kind of things are being "selected"? I'm surprised that WaitForMultipleObjects would be all that useful here since, except in the case of console I/O, it only really is used for event (e.g., events, semaphores, mutexes, thread termination) types of operations. It wouldn't be useful for pipes, for instance. And it wouldn't be useful for serial I/O unless the serial device was opened on overlapped mode. cgf