This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR remote/21188: Fix remote serial timeout


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]