diff options
| author | Elliott Hughes <enh@google.com> | 2013-07-29 16:51:45 -0700 |
|---|---|---|
| committer | Elliott Hughes <enh@google.com> | 2013-07-29 17:09:36 -0700 |
| commit | c03e1e74390c1b8a30341399cd85cc869d0842b0 (patch) | |
| tree | f4f7c54da4d89aa1019822c5be7aa61d97efcd43 /libc/bionic/sysconf.cpp | |
| parent | 9a73d08f4c334c00fe06d583d37e038ebe063eba (diff) | |
| download | bionic-c03e1e74390c1b8a30341399cd85cc869d0842b0.zip bionic-c03e1e74390c1b8a30341399cd85cc869d0842b0.tar.gz bionic-c03e1e74390c1b8a30341399cd85cc869d0842b0.tar.bz2 | |
Define PTHREAD_KEYS_MAX and _POSIX_THREAD_KEYS_MAX in a POSIX-compliant way.
Also make sysconf use PTHREAD_STACK_MIN rather than redefining its
own, different, constant.
Bug: 9997352
Change-Id: I9a8e7d2b18e691439abfb45533e82c36eee9e81d
Diffstat (limited to 'libc/bionic/sysconf.cpp')
| -rw-r--r-- | libc/bionic/sysconf.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/bionic/sysconf.cpp b/libc/bionic/sysconf.cpp index 9ab2007..e945fbf 100644 --- a/libc/bionic/sysconf.cpp +++ b/libc/bionic/sysconf.cpp @@ -33,6 +33,7 @@ #include <errno.h> #include <fcntl.h> #include <limits.h> +#include <pthread.h> #include <stdio.h> // For FOPEN_MAX. #include <string.h> #include <sys/sysconf.h> @@ -57,7 +58,6 @@ /* the following depends on our implementation */ #define SYSTEM_ATEXIT_MAX 65536 /* our implementation is unlimited */ -#define SYSTEM_THREAD_STACK_MIN 32768 /* lower values may be possible, but be conservative */ #define SYSTEM_THREAD_THREADS_MAX 2048 /* really unlimited */ #define SYSTEM_2_C_BIND _POSIX_VERSION /* Posix C binding version */ @@ -309,7 +309,7 @@ int sysconf(int name) { case _SC_THREAD_KEYS_MAX: return (BIONIC_TLS_SLOTS - TLS_SLOT_FIRST_USER_SLOT - GLOBAL_INIT_THREAD_LOCAL_BUFFER_COUNT); - case _SC_THREAD_STACK_MIN: return SYSTEM_THREAD_STACK_MIN; + case _SC_THREAD_STACK_MIN: return PTHREAD_STACK_MIN; case _SC_THREAD_THREADS_MAX: return SYSTEM_THREAD_THREADS_MAX; case _SC_TTY_NAME_MAX: return SYSTEM_TTY_NAME_MAX; #ifdef _POSIX_THREADS |
