summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/Makefile.inc
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-06-22 07:13:30 +0000
committerkib <kib@FreeBSD.org>2012-06-22 07:13:30 +0000
commit13a9f42818f6b89a72b3e40923be809b490400d8 (patch)
tree58a73d4c3dd528ab72afbea3d6243d4dd6c48c3e /lib/libc/sys/Makefile.inc
parent7b36a081088572ce45af9b675b5992adc971506d (diff)
downloadFreeBSD-src-13a9f42818f6b89a72b3e40923be809b490400d8.zip
FreeBSD-src-13a9f42818f6b89a72b3e40923be809b490400d8.tar.gz
Use struct vdso_timehands data to implement fast gettimeofday(2) and
clock_gettime(2) functions if supported. The speedup seen in microbenchmarks is in range 4x-7x depending on the hardware. Only amd64 and i386 architectures are supported. Libc uses rdtsc and kernel data to calculate current time, if enabled by kernel. Hopefully, this code is going to migrate into vdso in some future. Discussed with: bde Reviewed by: jhb Tested by: flo MFC after: 1 month
Diffstat (limited to 'lib/libc/sys/Makefile.inc')
-rw-r--r--lib/libc/sys/Makefile.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index 61d1713..df4ef42 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -15,6 +15,10 @@
#
.sinclude "${.CURDIR}/${LIBC_ARCH}/sys/Makefile.inc"
+SRCS+= clock_gettime.c gettimeofday.c __vdso_gettimeofday.c
+NOASM+= clock_gettime.o gettimeofday.o
+PSEUDO+= _clock_gettime.o _gettimeofday.o
+
# Sources common to both syscall interfaces:
SRCS+= stack_protector.c stack_protector_compat.c __error.c
.if !defined(WITHOUT_SYSCALL_COMPAT)
OpenPOWER on IntegriCloud