summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r--winsup/cygwin/thread.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index b53fc7f70..c70709bff 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -2510,6 +2510,15 @@ pthread_getconcurrency ()
return MT_INTERFACE->concurrency;
}
+extern "C" int
+pthread_getcpuclockid (pthread_t thread, clockid_t *clk_id)
+{
+ if (!pthread::is_good_object (&thread))
+ return (ESRCH);
+ *clk_id = (clockid_t) THREADID_TO_CLOCKID (thread->getsequence_np ());
+ return 0;
+}
+
/* keep this in sync with sched.cc */
extern "C" int
pthread_getschedparam (pthread_t thread, int *policy,