summaryrefslogtreecommitdiff
path: root/src/time/clock_gettime.c
AgeCommit message (Collapse)AuthorFilesLines
2014-04-16add working vdso clock_gettime support, including static linkingRich Felker1-5/+13
the vdso symbol lookup code is based on the original 2011 patch by Nicholas J. Kain, with some streamlining, pointer arithmetic fixes, and one symbol version matching fix. on the consumer side (clock_gettime), per-arch macros for the particular symbol name and version to lookup are added in syscall_arch.h, and no vdso code is pulled in on archs which do not define these macros. at this time, vdso is enabled only on x86_64. the vdso support at the dynamic linker level is no longer useful to libc, but is left in place for the sake of debuggers (which may need the vdso in the link map to find its functions) and possibly use with dlsym.
2014-04-14fix fallback code for old kernels in clock_gettimeRich Felker1-1/+1
2011-08-07use weak aliase rather than weak reference for vdso clock_gettimeRich Felker1-8/+12
this works around pcc's lack of working support for weak references, and in principle is nice because it gets us back to the stage where the only weak symbol feature we use is weak aliases, nothing else. having fewer dependencies on fancy linker features is a good thing.
2011-07-24workaround for gcc's optimizer breaking dynamic symbol resolutionRich Felker1-1/+2
2011-07-24const correctness on function pointerRich Felker1-1/+1
2011-07-23some preliminaries for vdso clock supportRich Felker1-2/+23
these changes also make it so clock_gettime(CLOCK_REALTIME, &ts) works even on pre-2.6 kernels, emulated via the gettimeofday syscall. there is no cost for the fallback check, as it falls under the error case that already must be checked for storing the error code in errno, but which would normally be hidden inside __syscall_ret.
2011-03-20global cleanup to use the new syscall interfaceRich Felker1-1/+1
2011-03-10fix errno behavior in clock_* functionsRich Felker1-1/+0
these functions are specified inconsistent in whether they're specified to return an error value, or return -1 and set errno. hopefully now they all match what POSIX requires.
2011-02-19implement the remaining clock_* interfacesRich Felker1-0/+1
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker1-0/+7