Browse Source

document in sysconf and unistd.h that per-thread cpu clocks exist

Rich Felker 11 years ago
parent
commit
f03db4bdff
2 changed files with 2 additions and 1 deletions
  1. 1 0
      include/unistd.h
  2. 1 1
      src/conf/sysconf.c

+ 1 - 0
include/unistd.h

@@ -223,6 +223,7 @@ void syncfs(int);
 #define _POSIX_THREAD_ATTR_STACKADDR _POSIX_VERSION
 #define _POSIX_THREAD_ATTR_STACKSIZE _POSIX_VERSION
 #define _POSIX_THREAD_PRIORITY_SCHEDULING _POSIX_VERSION
+#define _POSIX_THREAD_CPUTIME   _POSIX_VERSION
 #define _POSIX_TIMERS           _POSIX_VERSION
 #define _POSIX_TIMEOUTS         _POSIX_VERSION
 #define _POSIX_MONOTONIC_CLOCK  _POSIX_VERSION

+ 1 - 1
src/conf/sysconf.c

@@ -151,7 +151,7 @@ long sysconf(int name)
 		[_SC_C_LANG_SUPPORT_R] = -1,
 		[_SC_CLOCK_SELECTION] = VER,
 		[_SC_CPUTIME] = VER,
-		[_SC_THREAD_CPUTIME] = -1,
+		[_SC_THREAD_CPUTIME] = VER,
 		[_SC_DEVICE_IO] = -1,
 		[_SC_DEVICE_SPECIFIC] = -1,
 		[_SC_DEVICE_SPECIFIC_R] = -1,