From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52259 invoked by alias); 1 Mar 2017 21:52:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 52244 invoked by uid 89); 1 Mar 2017 21:52:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=UD:linkedin.com, sphere, Sphere, linkedin X-HELO: mail-ua0-f177.google.com Received: from mail-ua0-f177.google.com (HELO mail-ua0-f177.google.com) (209.85.217.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 01 Mar 2017 21:52:02 +0000 Received: by mail-ua0-f177.google.com with SMTP id 72so55732919uaf.3 for ; Wed, 01 Mar 2017 13:52:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=BteP+Q79oPawP8ywb9R9/myqYKKhdjncHg1i3K18yyw=; b=bCyF0o10McgLFvM9b6dGEM57tI/9KrIyrhsIUl9xoSOd40vzP00RXSYqa3v3a3jnGJ ii6KTVC0RcfflP7+jt7ioOb9Bb5rkyYc/DpRjWrVHW2sYmJd4/dOYTg97AD/xyhBojui rmee+zReoqYX+fG8aQXGLpwgMDVX8939FcMR18rzTRJbd1ep3KhyvqPdd9Td4ZJSL4qa Vn3hc3Y6lcl6L39CvbHnRNemztbImWtRnMwVDm8Re49/gfes4/oWa+tCBsbXCPd78cgv 3twIxsX0egpu+uN+Twq21UhOvsmzCS+81KFTgz4kDtlaASiZdfjyFzlNZtJScp5tOSZw /R2A== X-Gm-Message-State: AMke39m/Es5OrJHExQX8DTK3SCvR1t/c8dLoR+sSZEOet7BmubgCNyWn9YG2btYrCHVkrEm+/t6Iqgpo1AgVqg== X-Received: by 10.31.4.211 with SMTP id 202mr1706833vke.105.1488405121102; Wed, 01 Mar 2017 13:52:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.102.68 with HTTP; Wed, 1 Mar 2017 13:51:40 -0800 (PST) In-Reply-To: References: From: Gareth McMullin Date: Wed, 01 Mar 2017 21:52:00 -0000 Message-ID: Subject: Re: [PATCH] PR remote/21188: Fix remote serial timeout To: gdb-patches@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-03/txt/msg00015.txt.bz2 Ping On Tue, Feb 21, 2017 at 11:52 AM, Gareth McMullin wrote: > The timeout mechanism in ser-unix.c was changed in commit 048094acc. > > In do_hardwire_readchar(), the required timeout is broken into 1 > second intervals and wait_for() is called. Before, wait_for() set > VTIME and VMIN so the read would block, but now it uses select() to > block for the specified timeout. If wait_for() returns > SERIAL_TIMEOUT, do_hardwire_readchar() returns immediately, so the > timeout is always only 1s. > > The attached patch will repeatedly call wait_for() until the full > timeout has elapsed. > > Gareth -- Black Sphere Technologies Ltd. Web: www.blacksphere.co.nz Mobile: +64 27 777 2182 Tel: +64 9 478 8885 Skype: gareth.mcmullin LinkedIn: http://nz.linkedin.com/in/gsmcmullin