summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_getcpuclockid.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread/thr_getcpuclockid.c')
-rw-r--r--lib/libthr/thread/thr_getcpuclockid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_getcpuclockid.c b/lib/libthr/thread/thr_getcpuclockid.c
index 68f88d5..b4ec666 100644
--- a/lib/libthr/thread/thr_getcpuclockid.c
+++ b/lib/libthr/thread/thr_getcpuclockid.c
@@ -39,9 +39,11 @@ __weak_reference(_pthread_getcpuclockid, pthread_getcpuclockid);
int
_pthread_getcpuclockid(pthread_t pthread, clockid_t *clock_id)
{
+
if (pthread == NULL)
return (EINVAL);
- *clock_id = CLOCK_THREAD_CPUTIME_ID;
+ if (clock_getcpuclockid2(TID(pthread), CPUCLOCK_WHICH_TID, clock_id))
+ return (errno);
return (0);
}
OpenPOWER on IntegriCloud