summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2008-03-22 09:59:20 +0000
committerdavidxu <davidxu@FreeBSD.org>2008-03-22 09:59:20 +0000
commit1423f22a4cfd25ee67c64722cb270d04a9baa2f6 (patch)
tree015a0dec5360aa70620f168434fc00e9c526fd1c /include
parenta9d123c3ab34baa9fe2c8c25bd9acfbfb31b381e (diff)
downloadFreeBSD-src-1423f22a4cfd25ee67c64722cb270d04a9baa2f6.zip
FreeBSD-src-1423f22a4cfd25ee67c64722cb270d04a9baa2f6.tar.gz
Add POSIX pthread API pthread_getcpuclockid() to get a thread's cpu
time clock id.
Diffstat (limited to 'include')
-rw-r--r--include/pthread.h1
-rw-r--r--include/time.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/pthread.h b/include/pthread.h
index 361b45c..215b882 100644
--- a/include/pthread.h
+++ b/include/pthread.h
@@ -185,6 +185,7 @@ int pthread_detach(pthread_t);
int pthread_equal(pthread_t, pthread_t);
void pthread_exit(void *) __dead2;
void *pthread_getspecific(pthread_key_t);
+int pthread_getcpuclockid(pthread_t, clockid_t *);
int pthread_join(pthread_t, void **);
int pthread_key_create(pthread_key_t *,
void (*) (void *));
diff --git a/include/time.h b/include/time.h
index 69a41c2..d28d9b4 100644
--- a/include/time.h
+++ b/include/time.h
@@ -108,6 +108,7 @@ typedef __timer_t timer_t;
#define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */
#define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */
#define CLOCK_SECOND 13 /* FreeBSD-specific. */
+#define CLOCK_THREAD_CPUTIME_ID 14
#endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */
#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112
OpenPOWER on IntegriCloud