freebsd-dev/lib
Konstantin Belousov 6044c03a37 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
libalias
libarchive DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
libauditd
libbegemot
libblocksruntime
libbluetooth Declare bt_devenum() to match the definition. 2016-01-29 00:59:48 +00:00
libbsdstat
libbsm
libbsnmp
libbz2
libc Fully handle size_t lengths in AIO requests. 2016-03-21 21:37:33 +00:00
libc_nonshared
libc++ Add missing CLEANFILES. 2016-03-11 23:45:56 +00:00
libcalendar
libcam
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
libcompat
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
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
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
libexecinfo
libexpat
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
libgpio Remove WARNS inherited fine by ../Makefile.inc. 2016-02-26 22:14:23 +00:00
libgssapi
libiconv_modules
libipsec DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libjail
libkiconv
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
liblzma
libmagic
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
libnetbsd
libnetgraph
libngatm
libnv DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
libopenbsd
libopie
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
libradius
librpcsec_gss
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
libsbuf
libsdp
libsm DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libsmb
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
libstand If the dhcp server delivers an interface-mtu option, parse it and store 2016-03-21 14:58:12 +00:00
libstdbuf
libstdthreads
libsysdecode errno(3) -> errno(2) 2016-02-29 17:34:54 +00:00
libtacplus
libtelnet
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
libufs
libugidfw
libulog
libunbound Add to CFLAGS, rather than replacing. 2016-03-11 20:04:32 +00:00
libusb
libusbhid
libutil Fix handling of umtxp resource limit in sh(1)/ulimit(1), limits(1), add 2016-03-12 14:54:34 +00:00
libvgl
libvmmapi As <machine/param.h> is included from <sys/param.h>, there is no need 2016-02-22 09:04:36 +00:00
libwrap
libxo xo_config.h no longer in contrib, so -I's needed 2016-03-17 04:21:57 +00:00
liby
libypclnt DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
libz
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