freebsd-skq/lib
kib 40d3cfa056 Some third-party malloc(3) implementations use pthread_setspecific(3)
to handle per-thread information.  Since our pthread_setspecific()
implementation calls calloc(3) to allocate per-thread specific data
storage, things get complicated.

Switch the allocator to use bare mmap(2).  There is some loss of the
allocated page, since e.g. on amd64, PTHREAD_KEYS_MAX * sizeof(struct
pthread_specific_elem) is 3K (it actually spans whole page due to
padding), but I believe it is more acceptable than additional code for
specialized allocator().

The alternatives would either to make the specific data array be part of
the struct thread, or use internal bindings to call the libc malloc,
avoiding interposing.

Also do the style pass over the thr_spec.c, esp. simplify the
conditionals nesting by returning early when an error detected.
Remove trivial comments.

Found by:	yuri@rawbw.com
PR:	200138
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-05-15 08:40:17 +00:00
..
atf Add LIB_CXX so that C++ libraries will use CXX to link. 2015-03-17 15:16:36 +00:00
clang Update generated include/llvm/Support/DataTypes.h. 2015-02-28 00:31:01 +00:00
csu Ensure the cross assembler, linker and objcopy are used for the build32 2015-04-02 06:58:17 +00:00
libalias
libarchive libarchive: Allow setting nanosecond timestamps. 2015-04-25 21:25:00 +00:00
libauditd NO_MAN= has been deprecated in favor of MAN= for some time, go ahead 2014-04-13 05:21:56 +00:00
libbegemot
libblocksruntime Follow up to r276851 by also committing a necessary update to 2015-01-08 20:08:00 +00:00
libbluetooth Check l2cap socket initialisation and define L2CAP_SOCKET_CHECKED 2015-04-07 16:48:23 +00:00
libbsdstat libbsdstat: fix warnings, set WARNS 2014-03-11 01:10:44 +00:00
libbsm
libbsnmp Fix build with recent binutils 2014-12-23 10:43:35 +00:00
libbz2
libc Add fabs() to arm64 libc 2015-05-14 17:12:45 +00:00
libc_nonshared Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
libc++ Import libc++ trunk r224926. This fixes a number of bugs, completes 2015-01-15 21:17:36 +00:00
libcalendar use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libcam Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libcapsicum Approved, oprócz użycie RESTORE_ERRNO() do ustawiania errno. 2015-05-02 17:45:52 +00:00
libcasper Approved, oprócz użycie RESTORE_ERRNO() do ustawiania errno. 2015-05-02 17:45:52 +00:00
libclang_rt Update compiler-rt to trunk r228651. This enables using Address 2015-02-22 22:31:36 +00:00
libcom_err Remove GNU texinfo from base along with all info pages. 2015-01-02 18:45:03 +00:00
libcompat rexec(3): prevent uninitialized access to "port" variable. 2015-02-16 21:35:29 +00:00
libcompiler_rt compiler_rt: add floatunsitf for arm64 2015-04-16 12:54:28 +00:00
libcrypt Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libcuse Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libcxxrt Add support for __cxa_throw_bad_array_new_length in libcxxrt 2014-10-21 10:19:45 +00:00
libdevctl Add a new device control utility for new-bus devices called devctl. This 2015-02-06 16:09:01 +00:00
libdevinfo Expose the constants for internal new-bus device flags to userland. The 2015-02-05 22:42:44 +00:00
libdevstat Remove an obsolete comment in devstat(3) about the accuracy of the 2015-02-27 02:44:12 +00:00
libdpv mdoc: improvements to SEE ALSO. 2014-12-27 08:22:58 +00:00
libdwarf Update elftoolchain to upstream rev 3130 2014-12-29 19:16:40 +00:00
libedit Do not modify locales 2015-04-26 09:25:44 +00:00
libefi use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libelf Bump SHLIB_MAJOR for libelf. 2014-01-21 21:13:13 +00:00
libelftc Update to ELF Tool Chain r3197 2015-05-14 19:48:15 +00:00
libevent Rework PRIVATELIB 2015-05-04 16:28:54 +00:00
libexecinfo Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libexpat Add a ${CP} alias for copying files in the build. 2015-01-16 21:39:08 +00:00
libfetch Remove defunct SSLv2 support from fetch(1) and fetch(3). 2015-03-25 18:56:36 +00:00
libfigpar Add new libraries/utilities for data throughput visualization. 2014-11-04 23:46:01 +00:00
libgeom libgeom: plug memory leak in EndElement. 2015-04-22 22:23:56 +00:00
libgpib
libgpio Add the missing manual page link to the recently added function. 2015-03-20 19:29:59 +00:00
libgssapi mdoc: sort SEE ALSO. 2014-12-29 21:52:32 +00:00
libiconv_modules Remove the const qualifier from iconv(3) to comply with POSIX: 2015-04-15 09:09:20 +00:00
libipsec Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
libjail In preparation for using clang's -Wcast-qual: 2014-11-25 21:01:08 +00:00
libkiconv Remove the const qualifier from iconv(3) to comply with POSIX: 2015-04-15 09:09:20 +00:00
libkvm Add stub functions to build libkvm. There will be added, but we need them 2015-04-02 17:30:19 +00:00
libldns Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
liblzma Revert r282775 for now. The added dependency would cause problems for 2015-05-12 05:42:13 +00:00
libmagic Since the merge of file 5.21 in r276415 and r276416, stable/9 and 2015-01-13 20:37:57 +00:00
libmandoc libc now has reallocarray 2015-05-01 18:34:29 +00:00
libmd Unbreak MIPS build following rev. 282726 2015-05-11 16:45:33 +00:00
libmemstat Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libmilter Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
libmp Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libmt Minor mdoc fixes. 2015-04-20 21:19:26 +00:00
libnandfs
libnetbsd Commit missing header for sys/time.h compat on NetBSD to unbreak the amd64/i386 2014-11-04 02:00:07 +00:00
libnetgraph Some NetGraph debug polishing. 2015-02-06 09:41:16 +00:00
libngatm
libnv Add test case for unpack with diffrent flags. 2015-05-02 18:07:47 +00:00
libohash Make libohash a proper internallib instead of hidding it in m4 2014-08-06 22:46:15 +00:00
libopie Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libpam Conditionalize building radius support into libpam, ppp, etc via 2015-02-04 06:53:45 +00:00
libpcap MFV r276759: libpcap 1.6.2. 2015-01-06 22:29:12 +00:00
libpjdlog Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libpmc Minor mdoc fixes. 2015-04-20 21:19:26 +00:00
libproc Fix debug symbols loading in libproc: 0 is a valid file descriptor. 2015-03-13 04:26:48 +00:00
libprocstat Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libradius Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
librpcsec_gss mdoc: sort SEE ALSO. 2014-12-29 21:59:44 +00:00
librpcsvc Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
librt Build/install libc, librt, libthr, and msun NetBSD test suites on all 2015-04-27 06:49:27 +00:00
librtld_db mdoc: improvements to SEE ALSO. 2014-12-27 08:31:52 +00:00
libsbuf Unbreak the ABI by reverting r268494 until the compat shims are provided 2014-07-28 07:20:22 +00:00
libsdp Check l2cap socket initialisation and define L2CAP_SOCKET_CHECKED 2015-04-07 16:48:23 +00:00
libsm Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
libsmb Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libsmdb
libsmutil
libsqlite3 Fix typo 2014-11-25 11:08:58 +00:00
libstand Reduce diffs between the three copies of libstand's Makefile 2015-04-23 14:04:33 +00:00
libstdbuf
libstdthreads Use pthread_mutex_trylock(3) to implement mtx_trylock(3). 2015-02-26 16:39:57 +00:00
libtacplus Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libtelnet When building picobsd, define WITHOUT_OPENSSL and WITHOUT_KERBEROS and 2014-06-06 04:09:07 +00:00
libthr Some third-party malloc(3) implementations use pthread_setspecific(3) 2015-05-15 08:40:17 +00:00
libthread_db Add the arm64 parts of libthread_db. 2015-04-01 08:37:50 +00:00
libucl Rework PRIVATELIB 2015-05-04 16:28:54 +00:00
libufs use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libugidfw
libulog Convert libraries to use LIBADD 2014-11-25 11:07:26 +00:00
libunbound Add a ${CP} alias for copying files in the build. 2015-01-16 21:39:08 +00:00
libusb Add more USB request definitions. The values are described in section 2015-01-16 12:11:01 +00:00
libusbhid
libutil gr_equal(): Fix a crash that could occur if the first group's member list 2015-01-25 00:47:06 +00:00
libvgl use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libvmmapi Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup(). 2015-05-06 16:25:20 +00:00
libwrap Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
libxo Upgrade libxo to 0.3.2. 2015-04-27 17:23:19 +00:00
liby
libypclnt
libz only install .pc files when we are not installing 32bit compat libs... 2014-10-27 23:43:25 +00:00
msun The presence/absence of CPU features should be tested with 2015-04-28 14:14:06 +00:00
ncurses Parallelize building lib/ncurses 2014-12-27 21:11:42 +00:00
tests Install category Kyuafiles from their category directories. 2013-11-08 14:29:06 +00:00
Makefile Remove redundant csu subdir logic 2015-05-12 17:53:22 +00:00
Makefile.inc