glibc/sysdeps
Zack Weinberg 40a36935ff Use clock_gettime to implement timespec_get.
timespec_get is the same function as clock_gettime, with an obnoxious
coating of NIH painted on it by the ISO C committee.  In addition to
the rename, it takes its arguments in a different order, it returns 0
on *failure* or a positive number on *success*, and it requires that
all of its TIME_* constants be positive.  This last means we cannot
directly reuse the existing CLOCK_* constants for it, because
those have been allocated starting with CLOCK_REALTIME = 0 on all
existing platforms.

This patch simply promotes the sysdeps/posix implementation to
universal, and removes the Linux-specific implementation, whose
apparent reason for existing was to cut out one function call's worth
of overhead.

Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,
powerpc64-linux-gnu, powerpc-linux-gnu, and aarch64-linux-gnu.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-10-30 17:11:10 -03:00
..
aarch64 Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
alpha Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
arm Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
csky Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
generic Use clock_gettime to implement time. 2019-10-30 17:05:14 -03:00
gnu Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h. 2019-09-27 13:37:36 +00:00
hppa Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
htl time: Introduce function to check correctness of nanoseconds value 2019-10-27 21:49:25 +01:00
hurd Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
i386 Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ia64 Remove math-finite.h 2019-10-21 08:47:07 -03:00
ieee754 Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
init_array Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
m68k Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
mach Use clock_settime to implement settimeofday. 2019-10-30 17:05:14 -03:00
microblaze Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
mips Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
nios2 Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
nptl nptl: SIGCANCEL, SIGTIMER, SIGSETXID are always defined 2019-10-18 14:29:04 +02:00
posix Use clock_gettime to implement timespec_get. 2019-10-30 17:11:10 -03:00
powerpc [powerpc] No need to enter "Ignore Exceptions Mode" 2019-10-02 10:30:51 -05:00
pthread Change most internal uses of __gettimeofday to __clock_gettime. 2019-10-30 17:04:10 -03:00
riscv Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
s390 S390: Add new s390 platform z15. 2019-10-18 14:57:14 +02:00
sh Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
sparc time: Introduce function to check correctness of nanoseconds value 2019-10-27 21:49:25 +01:00
unix Use clock_gettime to implement timespec_get. 2019-10-30 17:11:10 -03:00
wordsize-32 Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
wordsize-64 Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
x86 elf: Use nocancel pread64() instead of lseek()+read() 2019-10-18 15:55:33 -04:00
x86_64 Remove x64 _finite tests and references 2019-10-21 14:29:12 -03:00