freebsd-skq/lib
kib 2a4182c291 Apparently there are some popular programs around which assume that it
is safe to call pthread_mutex_init() on the same shared mutex several
times.  POSIX claims that the behaviour in this case is undefined.

Make this working by only allowing one caller to initialize the mutex.
Other callers either see already completed initialization and do
nothing, or busy-loop yielding while designated initializer finishes.
Also make the API requirements loose by initializing mutexes on other
pthread_mutex*() calls if they see uninitialized shared mutex.

Only mutexes provide the hack for now, but it could be also
implemented for other process shared primitives from libthr.

Reported and tested by:	"Oleg V. Nauman" <oleg@opentransfer.com>
Sponsored by:	The FreeBSD Foundation
2016-03-22 10:51:42 +00:00
..
atf Remove bogus .ORDER. 2016-03-11 23:45:42 +00:00
clang Use the new bmake .dinclude feature to make these safe. 2016-03-11 04:17:39 +00:00
csu Remove the compat code to handle the kernel passing us an unalinged 2016-01-13 15:54:17 +00:00
lib80211 Minor spelling, mdoc and style cleanup. 2015-12-15 10:24:48 +00:00
libalias META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libarchive DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
libauditd Don't override LIB*DIR variables from src.libnames.mk. 2015-12-01 22:03:40 +00:00
libbegemot META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libblocksruntime META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libbluetooth Declare bt_devenum() to match the definition. 2016-01-29 00:59:48 +00:00
libbsdstat META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
libbsm Add au_notify.2 and MLINKs (added in OpenBSM 1.2 alpha 4). 2015-12-18 09:50:24 +00:00
libbsnmp META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libbz2 META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libc Fully handle size_t lengths in AIO requests. 2016-03-21 21:37:33 +00:00
libc_nonshared Add META_MODE support. 2015-06-13 19:20:56 +00:00
libc++ Add missing CLEANFILES. 2016-03-11 23:45:56 +00:00
libcalendar META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libcam META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libcasper Update dependencies. 2016-02-26 22:14:15 +00:00
libclang_rt DIRDEPS_BUILD: Update clang dependencies after r296417. 2016-03-08 21:26:44 +00:00
libcom_err META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libcompat Add META_MODE support. 2015-06-13 19:20:56 +00:00
libcompiler_rt Merge compiler-rt release_38 branch r258968. 2016-02-06 13:39:20 +00:00
libcrypt DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
libcuse Make CUSE usable with platforms where the size of "unsigned long" is 2015-12-22 09:55:44 +00:00
libcxxrt DIRDEPS_BUILD: Update dependencies. 2016-02-24 17:18:35 +00:00
libdevctl - Note that devctl(8) will appear in 10.3 first. 2016-02-02 22:55:03 +00:00
libdevinfo Bump libdevinfo SHLIB_MAJOR, forgotten in r297000. 2016-03-18 01:53:00 +00:00
libdevstat META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libdpv Remove WARNS inherited fine by ../Makefile.inc. 2016-02-26 22:14:23 +00:00
libdwarf DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libedit Revert r296175 2016-03-06 21:32:54 +00:00
libefi
libelf DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libelftc Update ELF Tool Chain to upstream rev 3400 2016-02-12 20:54:02 +00:00
libevent META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
libexecinfo META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libexpat META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libfetch Update fetch.1 and fetch.3 to reflect libfetch's actual use of CA bundles 2016-03-19 11:55:21 +00:00
libfigpar Remove WARNS inherited fine by ../Makefile.inc. 2016-02-26 22:14:23 +00:00
libgeom META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libgpio Remove WARNS inherited fine by ../Makefile.inc. 2016-02-26 22:14:23 +00:00
libgssapi Fix a memory leak in gss_release_oid_set 2016-01-04 17:42:12 +00:00
libiconv_modules META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libipsec DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libjail META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libkiconv META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libkvm Rename pte.h to pte-v4.h and start including directly either pte-v4.h 2016-02-19 09:23:32 +00:00
libldns META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
liblzma META MODE: Fix 'make bootstrap-tools'. 2015-11-25 19:44:51 +00:00
libmagic META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libmd DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libmemstat Include sys/_task.h into uma_int.h, so that taskqueue.h isn't a 2016-02-09 20:22:35 +00:00
libmilter DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libmp DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
libmt Fix typo. 2016-02-29 17:20:37 +00:00
libnandfs META MODE: Connect MK_NAND directories. 2015-12-02 05:31:01 +00:00
libnetbsd Fix spelling error. 2015-11-05 01:54:38 +00:00
libnetgraph META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libngatm META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libnv DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
libopenbsd Remove NO_WERROR, after fix from r292023. 2015-12-09 19:25:45 +00:00
libopie META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libpam DIRDEPS_BUILD: Update dependencies. 2016-03-11 23:45:59 +00:00
libpcap DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libpe DIRDEPS_BUILD: Update dependencies. 2016-02-16 02:14:30 +00:00
libpjdlog Remove WARNS inherited fine by ../Makefile.inc. 2016-02-26 22:14:23 +00:00
libpmc Connect pmc.haswellxeon(3) to the build; looks like it was missed in r279829. 2016-03-01 11:34:44 +00:00
libproc DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
libprocstat META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libradius META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
librpcsec_gss META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
librpcsvc DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
librt DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
librtld_db META MODE: Rework circular dependency guard for librtld_db/libproc. 2015-11-25 19:13:35 +00:00
libsbuf META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libsdp META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libsm DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libsmb META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libsmdb DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libsmutil DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libsqlite3 META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libstand If the dhcp server delivers an interface-mtu option, parse it and store 2016-03-21 14:58:12 +00:00
libstdbuf META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libstdthreads META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libsysdecode errno(3) -> errno(2) 2016-02-29 17:34:54 +00:00
libtacplus Add META_MODE support. 2015-06-13 19:20:56 +00:00
libtelnet Add META_MODE support. 2015-06-13 19:20:56 +00:00
libthr Apparently there are some popular programs around which assume that it 2016-03-22 10:51:42 +00:00
libthread_db Add the RISC-V MD parts of libthread_db. 2016-01-27 10:34:07 +00:00
libucl META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libufs META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libugidfw META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libulog META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libunbound Add to CFLAGS, rather than replacing. 2016-03-11 20:04:32 +00:00
libusb META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libusbhid META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libutil Fix handling of umtxp resource limit in sh(1)/ulimit(1), limits(1), add 2016-03-12 14:54:34 +00:00
libvgl META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
libvmmapi As <machine/param.h> is included from <sys/param.h>, there is no need 2016-02-22 09:04:36 +00:00
libwrap Use LIBEXECDIR for /usr/libexec. 2015-11-26 01:14:40 +00:00
libxo xo_config.h no longer in contrib, so -I's needed 2016-03-17 04:21:57 +00:00
liby Add META_MODE support. 2015-06-13 19:20:56 +00:00
libypclnt DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libz META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host. 2015-11-25 19:10:28 +00:00
msun DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
ncurses DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
tests DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
Makefile Use the newly minted Makefile.libcompat to implement libsoft libraries 2016-03-12 23:25:05 +00:00
Makefile.inc