[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-commit-watch] [SCM] GPSD branch, master, updated. release-3.16-535
From: |
Fred Wright |
Subject: |
[gpsd-commit-watch] [SCM] GPSD branch, master, updated. release-3.16-535-ga5bbf14 |
Date: |
Sat, 7 Jan 2017 07:10:40 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GPSD".
The branch, master has been updated
via a5bbf14516aa7d0650e240806f39b98442768e94 (commit)
from c1530269368964931868e2d0d3422cbaf7c85f76 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a5bbf14516aa7d0650e240806f39b98442768e94
Author: Fred Wright <address@hidden>
Date: Fri Jan 6 23:04:46 2017 -0800
Removes pointless OSX-specific clock_gettime fallback.
The clock_gettime() fallback code was using clock_get_time() on OSX,
presumably in order to get its apparent nanosecond resolution. But it
turns out that clock_get_time() only has microsecond resolution, in
spite of the nanosecond-resolution data format. This makes it no
better than gettimeofday() in practice. In addition, it's
substantially slower. The clock_get_time() version as typically
implemented (including here) takes about 3us on a 3GHz Mac Pro, as
compared to about 43ns for gettimeofday(). Even if the code is
improved by cacheing the clock port rather than obtaining it once per
call, it still takes over 800us. Thus, using gettimeofday() and
scaling the microseconds to nanoseconds is actually the best approach.
Since there was already a fallback based on gettimeofday() for other
clock_gettime()-impaired platforms, this fix simply removes the
OSX-specific version and the related conditional.
It's worth noting that the official OSX clock_gettime(), which
appeared on 10.12 (Sierra), still has only microsecond resolution, and
comparable speed to gettimeofday().
The gettimeofday()-based fallback included some "paranoid" code
checking for out-of-range microsecond values. But in addition to its
being questionable to check the direct return results of system calls,
the "paranoid" checks were *after* the tv_usec value had already been
used. Hence, that code never could have had any effect, and would
have been optimized out by a clever compiler. It's now been removed.
TESTED:
Ran "scons build-all check" on OSX 10.5, 10.9, and 10.12, as well as
Ubuntu 14.
-----------------------------------------------------------------------
Summary of changes:
clock_gettime.c | 36 ++++++++++--------------------------
1 file changed, 10 insertions(+), 26 deletions(-)
hooks/post-receive
--
GPSD
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gpsd-commit-watch] [SCM] GPSD branch, master, updated. release-3.16-535-ga5bbf14,
Fred Wright <=