فهرست منبع

report support of TPS option in unistd.h and sysconf

also update another newish feature in sysconf, stackaddr
Rich Felker 12 سال پیش
والد
کامیت
7df42e8744
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 1 0
      include/unistd.h
  2. 2 2
      src/conf/sysconf.c

+ 1 - 0
include/unistd.h

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

+ 2 - 2
src/conf/sysconf.c

@@ -89,9 +89,9 @@ long sysconf(int name)
 		[_SC_THREAD_KEYS_MAX] = PTHREAD_KEYS_MAX,
 		[_SC_THREAD_STACK_MIN] = PTHREAD_STACK_MIN,
 		[_SC_THREAD_THREADS_MAX] = -1,
-		[_SC_THREAD_ATTR_STACKADDR] = -1,
+		[_SC_THREAD_ATTR_STACKADDR] = VER,
 		[_SC_THREAD_ATTR_STACKSIZE] = VER,
-		[_SC_THREAD_PRIORITY_SCHEDULING] = -1,
+		[_SC_THREAD_PRIORITY_SCHEDULING] = VER,
 		[_SC_THREAD_PRIO_INHERIT] = -1,
 		[_SC_THREAD_PRIO_PROTECT] = -1,
 		[_SC_THREAD_PROCESS_SHARED] = VER,