freebsd-nq/lib
John Baldwin 53e1ffbbce The current POSIX semaphore implementation stores the _has_waiters flag
in a separate word from the _count.  This does not permit both items to
be updated atomically in a portable manner.  As a result, sem_post()
must always perform a system call to safely clear _has_waiters.

This change removes the _has_waiters field and instead uses the high bit
of _count as the _has_waiters flag.  A new umtx object type (_usem2) and
two new umtx operations are added (SEM_WAIT2 and SEM_WAKE2) to implement
these semantics.  The older operations are still supported under the
COMPAT_FREEBSD9/10 options.  The POSIX semaphore API in libc has
been updated to use the new implementation.  Note that the new
implementation is not compatible with the previous implementation.
However, this only affects static binaries (which cannot be helped by
symbol versioning).  Binaries using a dynamic libc will continue to work
fine.  SEM_MAGIC has been bumped so that mismatched binaries will error
rather than corrupting a shared semaphore.  In addition, a padding field
has been added to sem_t so that it remains the same size.

Differential Revision:	https://reviews.freebsd.org/D961
Reported by:	adrian
Reviewed by:	kib, jilles (earlier version)
Sponsored by:	Norse
2014-10-24 20:02:44 +00:00
..
atf Fix typo in lib/atf/libatfc++/Makefile 2014-08-17 23:30:45 +00:00
clang Fix the TARGET_ABI value clang uses. It shpuld be gnueabi on all ARM 2014-10-01 12:47:25 +00:00
csu Use bsd.lib.mk here as all other csu Makefiles do. 2014-08-19 15:30:56 +00:00
libalias
libarchive In r232153, libarchive 3.0.3 was imported, replacing the archive_hash.h 2014-07-26 15:33:20 +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
libbluetooth use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libbsdstat libbsdstat: fix warnings, set WARNS 2014-03-11 01:10:44 +00:00
libbsm
libbsnmp Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
libbz2
libc The current POSIX semaphore implementation stores the _has_waiters flag 2014-10-24 20:02:44 +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++ When using an external gcc 4.8+ and not building libstdc++ then create in the objectdir a 2014-10-21 20:04:05 +00:00
libcalendar use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libcam use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libcapsicum use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libcasper Update most userspace consumers of capability.h to use capsicum.h instead. 2014-03-16 11:04:44 +00:00
libcom_err
libcompat
libcompiler_rt Clean up detection of hard-float ABIs. As with big-endian in r272368 we 2014-10-01 16:08:19 +00:00
libcrypt Change the hardcoded default back from SHA512 to DES. 2014-10-09 16:45:11 +00:00
libcuse Fix compiler locking diagnostic warnings. 2014-10-13 19:05:18 +00:00
libcxxrt Add support for __cxa_throw_bad_array_new_length in libcxxrt 2014-10-21 10:19:45 +00:00
libdevinfo use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libdevstat use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libdwarf Bump SHLIB_MAJOR for libdwarf as ABI/API has changed. 2014-01-21 21:11:07 +00:00
libedit Fix mismatch. 2014-07-23 15:12:17 +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
libevent Promote libevent to lib/ level and fold ftp-proxy into its parent Makefile. 2014-10-13 22:15:26 +00:00
libexecinfo Don't install private libexecinfo headers 2013-09-03 13:31:43 +00:00
libexpat use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libfetch As pointed out by several people, r273114 was incorrect: it unconditionally 2014-10-15 07:35:50 +00:00
libgeom Explicitly specify MAP_SHARED when mapping the stats file descriptor. 2014-09-17 19:37:58 +00:00
libgpib
libgssapi use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libiconv Split the last gcc-specific flags off into CFLAGS.gcc. This also 2014-01-05 21:03:49 +00:00
libiconv_modules Replace malloc+memset with calloc. 2014-06-13 08:26:53 +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 Fix some memory allocation errors: 2012-10-04 19:07:05 +00:00
libkiconv Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
libkvm Allow libkvm to get the kernel va to pa delta without the need for 2014-10-19 20:23:31 +00:00
libldns Remove dead files. 2014-05-15 15:22:32 +00:00
liblzma
libmagic MFV r267843: update file/libmagic to 5.19. 2014-06-26 06:03:39 +00:00
libmandoc Merge mdocml v1.12.3 into head 2014-02-01 09:27:57 +00:00
libmd use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libmemstat use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +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 Integrate lib/libmp into the build/kyua 2014-08-04 22:10:07 +00:00
libnandfs
libnetbsd The NetBSD libc tests use several definitions/macros that aren't available in 2014-10-22 21:04:54 +00:00
libnetgraph use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libngatm
libnv Fix problem on big endian systems introduced in r271579 - when we were 2014-10-09 20:55:05 +00:00
libohash Make libohash a proper internallib instead of hidding it in m4 2014-08-06 22:46:15 +00:00
libopie Bump version because challenge buffer size changed 2014-08-14 04:42:09 +00:00
libpam Consistently cast tty and user to const char * in printf()-like contexts. 2014-10-01 07:15:02 +00:00
libpcap Add netmap support to libpcap. Tcpdump and other native pcap application can now 2014-10-06 15:48:28 +00:00
libpjdlog Move my simple logging API to a separate library. It is now already used 2013-12-01 09:41:06 +00:00
libpmc Update the list of cross references to include the more modern set of 2014-07-28 10:17:41 +00:00
libproc Remove an incorrect and useless debug print. 2014-10-04 02:34:30 +00:00
libprocstat use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libradius Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
librpcsec_gss use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +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 Convert this piece of code to use C11 atomics. 2013-06-30 08:59:33 +00:00
librtld_db Hook up support for userland CTF support in DTrace. This required some 2014-10-03 23:20:37 +00:00
libsbuf Unbreak the ABI by reverting r268494 until the compat shims are provided 2014-07-28 07:20:22 +00:00
libsdp use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +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 Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
libsmdb
libsmutil
libstand Remove MK_ARM_EABI, the armeb issues have been fixed. The code to support 2014-10-01 08:26:51 +00:00
libstdbuf Remove WARNS=6 lines. 2012-10-18 15:39:29 +00:00
libstdthreads Add lock annotations to the header files of our threading libraries. 2014-09-01 18:34:30 +00:00
libtacplus mdoc sweep. 2013-05-12 22:22:12 +00:00
libtelnet When building picobsd, define WITHOUT_OPENSSL and WITHOUT_KERBEROS and 2014-06-06 04:09:07 +00:00
libthr Fix description of mutex acquisition. 2014-09-26 04:33:27 +00:00
libthread_db Remove ia64. 2014-07-07 00:27:09 +00:00
libucl Update libucl to the 2014-07-16 snapshot 2014-07-18 06:58:01 +00:00
libufs use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libugidfw
libulog Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
libunbound Fix incremental builds involving non-root users with read-only source files. 2014-09-18 14:54:20 +00:00
libusb Add more USB class codes. 2014-08-18 14:23:07 +00:00
libusbhid Restore handling of the third argument (id) of hid_start_parse(), same as 2012-09-20 18:56:27 +00:00
libutil Integrate lib/libutil into the build/kyua 2014-08-13 04:56:27 +00:00
libvgl use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
libvmmapi Fix fault injection in bhyve. 2014-07-24 01:38:11 +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 Hook libxo to the build. 2014-10-23 23:14:23 +00:00
liby
libypclnt
libz Fix path for zlib examples, this have no runtime effect and was 2014-06-11 20:48:40 +00:00
msun The value small=2**-(p+3), where p is the precision, can be determine from 2014-10-09 22:39:52 +00:00
ncurses Remove ia64. 2014-07-07 00:27:09 +00:00
tests Install category Kyuafiles from their category directories. 2013-11-08 14:29:06 +00:00
Makefile Hook libxo to the build. 2014-10-23 23:14:23 +00:00
Makefile.inc