From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25228 invoked by alias); 6 Feb 2006 04:03:38 -0000 Received: (qmail 25220 invoked by uid 22791); 6 Feb 2006 04:03:38 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 06 Feb 2006 04:03:36 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F5xbB-0002p4-AZ; Sun, 05 Feb 2006 23:03:33 -0500 Date: Mon, 06 Feb 2006 04:03:00 -0000 From: Daniel Jacobowitz To: Ian Lance Taylor Cc: gdb-patches@sourceware.org Subject: Re: RFA: Various Windows (mingw32) additions, mostly relating to select or serial ports Message-ID: <20060206040333.GA10822@nevyn.them.org> Mail-Followup-To: Ian Lance Taylor , gdb-patches@sourceware.org References: <20060203220529.GA3578@nevyn.them.org> <20060204145911.GC17011@nevyn.them.org> <20060205215958.GA7299@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00118.txt.bz2 On Sun, Feb 05, 2006 at 07:27:41PM -0800, Ian Lance Taylor wrote: > I guess I had assumed that you were going to have a thread around all > the time anyhow. Is creating a thread on Windows so cheap that one > can do it every time gdb calls select? Yes, it is that cheap. But I wasn't clear - we have the thread the whole time, but we don't rely on it; it goes to sleep and we wake it when selecting. It only polls when GDB is idle in a select call for this fd. (Actually, I think that it continues to poll for some time afterwards until the next byte of data does arrive on that pipe, or the pipe's closed. That's just because (A) it's cheap, and (B) I had no other reason to have a cleanup hook after the end of select.) -- Daniel Jacobowitz CodeSourcery