libc/libpthread: Add clock_getcpuclockid() and pthread_getcpuclockid().
authorSascha Wildner <saw@online.de>
Wed, 26 Jul 2017 17:57:32 +0000 (19:57 +0200)
committerSascha Wildner <saw@online.de>
Wed, 26 Jul 2017 17:57:32 +0000 (19:57 +0200)
commit725edadf86d63f56a584adf23265845c8590d734
tree684b6f03f26b0368d722ef86a31f04a9aabef6ce
parent3de745f413164b0db73a5e518517730fcf8ae5d7
libc/libpthread: Add clock_getcpuclockid() and pthread_getcpuclockid().

* Adjust clock_gettime() and clock_getres() to accept values obtained
  this way.

* Also set _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME, although we should
  really support values obtained by these functions in clock_settime()
  too.

Based on and taken from FreeBSD's code.

Reviewed-by: sephe
28 files changed:
include/pthread.h
include/time.h
include/unistd.h
lib/libc/gen/Makefile.inc
lib/libc/gen/Symbol.map
lib/libc/gen/_pthread_stubs.c
lib/libc/gen/clock_getcpuclockid.3 [new file with mode: 0644]
lib/libc/gen/clock_getcpuclockid.c [new file with mode: 0644]
lib/libc/include/namespace.h
lib/libc/include/un-namespace.h
lib/libc/sys/Symbol.map
lib/libc/sys/clock_gettime.2
lib/libpthread/Makefile
lib/libpthread/pthread_getcpuclockid.3 [new file with mode: 0644]
lib/libthread_xu/pthread.map
lib/libthread_xu/thread/Makefile.inc
lib/libthread_xu/thread/thr_getcpuclockid.c [new file with mode: 0644]
lib/libthread_xu/thread/thr_init.c
sys/kern/init_sysent.c
sys/kern/kern_time.c
sys/kern/syscalls.c
sys/kern/syscalls.master
sys/sys/param.h
sys/sys/syscall.h
sys/sys/syscall.mk
sys/sys/sysproto.h
sys/sys/sysunion.h
sys/sys/unistd.h