NetBSD/lib/libpthread_dbg
manu 841339f07f Make PTHREAD_KEYS_MAX dynamically adjustable
NetBSD's PTHREAD_KEYS_MAX is set to 256, which is low compared to
other systems like Linux (1024) or MacOS X (512). As a result some
setups tested on Linux will exhibit problems on NetBSD because of
pthread_keys usage beyond the limit. This happens for instance on
Apache with various module loaded, and in this case no particular
developper can be blamed for going beyond the limit, since several
modules from different sources contribute to the problem.

This patch makes the limit conigurable through the PTHREAD_KEYS_MAX
environement variable. If undefined, the default remains unchanged
(256). In any case, the value cannot be lowered below POSIX-mandated
_POSIX_THREAD_KEYS_MAX (128).

While there:
- use EXIT_FAILURE instead of 1 when calling err(3) in libpthread.
- Reset _POSIX_THREAD_KEYS_MAX to POSIX mandated 128, instead of 256.
2015-05-29 07:37:31 +00:00
..
Makefile Introduce GENASSYM_CPPFLAGS for options during genassym processing. 2014-03-04 14:58:14 +00:00
pthread_dbg.c Make PTHREAD_KEYS_MAX dynamically adjustable 2015-05-29 07:37:31 +00:00
pthread_dbg.h
pthread_dbg_int.h
shlib_version