This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] PR remote/21188: Fix remote serial timeout
- From: Gareth McMullin <gareth at blacksphere dot co dot nz>
- To: gdb-patches at sourceware dot org
- Date: Thu, 2 Mar 2017 10:51:40 +1300
- Subject: Re: [PATCH] PR remote/21188: Fix remote serial timeout
- Authentication-results: sourceware.org; auth=none
- References: <CAL8qUbq2+mJ5OgqTmodR_g4tmQqPGYC_50W4zSBgH9N1Xnje8A@mail.gmail.com>
Ping
On Tue, Feb 21, 2017 at 11:52 AM, Gareth McMullin
<gareth@blacksphere.co.nz> 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