Merge "Fix PTHREAD_THREADS_MAX."

This commit is contained in:
Elliott Hughes 2016-03-16 17:07:49 +00:00 committed by Gerrit Code Review
commit b31d2705d5
2 changed files with 8 additions and 5 deletions

View file

@ -124,8 +124,8 @@ long sysconf(int name) {
case _SC_THREAD_DESTRUCTOR_ITERATIONS: return PTHREAD_DESTRUCTOR_ITERATIONS;
case _SC_THREAD_KEYS_MAX: return PTHREAD_KEYS_MAX;
case _SC_THREAD_STACK_MIN: return PTHREAD_STACK_MIN;
case _SC_THREAD_THREADS_MAX: return PTHREAD_THREADS_MAX;
case _SC_TTY_NAME_MAX: return 32; // Seems default on linux.
case _SC_THREAD_THREADS_MAX: return -1; // No specific limit.
case _SC_TTY_NAME_MAX: return 32; // Seems default on linux.
case _SC_THREADS: return _POSIX_THREADS;
case _SC_THREAD_ATTR_STACKADDR: return _POSIX_THREAD_ATTR_STACKADDR;
case _SC_THREAD_ATTR_STACKSIZE: return _POSIX_THREAD_ATTR_STACKSIZE;

View file

@ -120,8 +120,11 @@
#define _XOPEN_VERSION 700 /* by Posix definition */
#define PTHREAD_DESTRUCTOR_ITERATIONS 4 // >= _POSIX_THREAD_DESTRUCTOR_ITERATIONS
#define PTHREAD_KEYS_MAX 128 // >= _POSIX_THREAD_KEYS_MAX
#define PTHREAD_THREADS_MAX 2048 // bionic has no specific limit
/* >= _POSIX_THREAD_DESTRUCTOR_ITERATIONS */
#define PTHREAD_DESTRUCTOR_ITERATIONS 4
/* >= _POSIX_THREAD_KEYS_MAX */
#define PTHREAD_KEYS_MAX 128
/* bionic has no specific limit */
#undef PTHREAD_THREADS_MAX
#endif