[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] tests hanging on netsbd-6 i386
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-dev] tests hanging on netsbd-6 i386 |
Date: |
Sat, 31 Jan 2015 13:31:53 -0500 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Greg Troxel <address@hidden>:
>
> "Eric S. Raymond" <address@hidden> writes:
>
> > Yup. The failure commit is the one where that's actually implemented.
> > My guess is that BSD doesn't implement VTIME right. (You must be getting
> > VMIN right or the old code wouldn't work).
> >
> > No big deal if that's so, we'll just condition out that code for BSD
> > and all you'll lose is the anti-buzz protection.
>
> The following goes back to 1/0 from n/1, and tests are passing. I will
> add a better comment and commit. Or this could be in calling
> gpsd_optimize_io, but to me the point is that the optimize attempt
> doesn't work, so this feels like the right place.
>
> diff --git a/serial.c b/serial.c
> index 74e339b..0db14d4 100644
> --- a/serial.c
> +++ b/serial.c
> @@ -610,13 +610,17 @@ ssize_t gpsd_serial_write(struct gps_device_t * session,
> }
>
> void gpsd_optimize_io(struct gps_device_t *session,
> - const int minlength, const bool textual UNUSED)
> + /* const */ int minlength, const bool textual UNUSED)
> /* optimize I/O mode depending on the minimum packet size */
> {
> /* bail out if this is not actually a tty */
> if (isatty(session->gpsdata.gps_fd) == 0)
> return;
>
> +#ifdef __NetBSD__
> + minlength = 1;
> +#endif
> +
> /*
> * This is an optimization hack. The idea is to get away from
> * character-at-a-time I/O in order to slow down the rate at
That's more complex than necessary. When the device is opened it's set
up to do character-at-a-time blocking I/O. If you just condition out
the whole body of gpsd_optimize_io() the right thing will happen.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
signature.asc
Description: Digital signature
- [gpsd-dev] tests hanging on netsbd-6 i386, Greg Troxel, 2015/01/30
- Re: [gpsd-dev] tests hanging on netsbd-6 i386, Eric S. Raymond, 2015/01/30
- Re: [gpsd-dev] tests hanging on netsbd-6 i386, Greg Troxel, 2015/01/30
- Re: [gpsd-dev] tests hanging on netsbd-6 i386, Greg Troxel, 2015/01/30
- Re: [gpsd-dev] tests hanging on netsbd-6 i386, Eric S. Raymond, 2015/01/30
- Re: [gpsd-dev] tests hanging on netsbd-6 i386, Greg Troxel, 2015/01/30
- Re: [gpsd-dev] tests hanging on netsbd-6 i386, Eric S. Raymond, 2015/01/30
- Re: [gpsd-dev] tests hanging on netsbd-6 i386, Greg Troxel, 2015/01/30
- Re: [gpsd-dev] tests hanging on netsbd-6 i386, Greg Troxel, 2015/01/30
- Re: [gpsd-dev] tests hanging on netsbd-6 i386, Eric S. Raymond, 2015/01/31
- Re: [gpsd-dev] tests hanging on netsbd-6 i386,
Eric S. Raymond <=
- Re: [gpsd-dev] tests hanging on netsbd-6 i386, Eric S. Raymond, 2015/01/30
Re: [gpsd-dev] tests hanging on netsbd-6 i386, Greg Troxel, 2015/01/30