freebsd-skq/share
John Baldwin 4e7f640dfb Optimize sx locks to use simple atomic operations for the common cases of
obtaining and releasing shared and exclusive locks.  The algorithms for
manipulating the lock cookie are very similar to that rwlocks.  This patch
also adds support for exclusive locks using the same algorithm as mutexes.

A new sx_init_flags() function has been added so that optional flags can be
specified to alter a given locks behavior.  The flags include SX_DUPOK,
SX_NOWITNESS, SX_NOPROFILE, and SX_QUITE which are all identical in nature
to the similar flags for mutexes.

Adaptive spinning on select locks may be enabled by enabling the
ADAPTIVE_SX kernel option.  Only locks initialized with the SX_ADAPTIVESPIN
flag via sx_init_flags() will adaptively spin.

The common cases for sx_slock(), sx_sunlock(), sx_xlock(), and sx_xunlock()
are now performed inline in non-debug kernels.  As a result, <sys/sx.h> now
requires <sys/lock.h> to be included prior to <sys/sx.h>.

The new kernel option SX_NOINLINE can be used to disable the aforementioned
inlining in non-debug kernels.

The size of struct sx has changed, so the kernel ABI is probably greatly
disturbed.

MFC after:	1 month
Submitted by:	attilio
Tested by:	kris, pjd
2007-03-31 23:23:42 +00:00
..
colldef Add locales for nb_NO and nn_NO. 2006-11-09 18:10:34 +00:00
dict Correct typos containing my login name (plus one more in expr.y). 2007-02-18 19:48:59 +00:00
doc style(9) fixes. 2007-03-02 18:10:55 +00:00
examples - Add ports-ports-mgmt collection 2007-01-31 14:35:05 +00:00
info Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
isdn
man Optimize sx locks to use simple atomic operations for the common cases of 2007-03-31 23:23:42 +00:00
me
misc - Add retire dates for alumni where possible 2007-03-31 22:55:56 +00:00
mk Stop clobberring the application namespace with local 2007-03-12 13:54:52 +00:00
mklocale Add locales for nb_NO and nn_NO. 2006-11-09 18:10:34 +00:00
monetdef International code for Russian Ruble is changed from RUR to RUB 2007-02-28 16:28:49 +00:00
msgdef Add locales for nb_NO and nn_NO. 2006-11-09 18:10:34 +00:00
numericdef Add locales for nb_NO and nn_NO. 2006-11-09 18:10:34 +00:00
security Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
sendmail Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
skel Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
snmp Define a base OID for the FreeBSD version as returned in sysObjectID 2006-10-31 10:09:10 +00:00
syscons Fix hr.iso syscons keymap, making it possible to type < and >. 2007-02-04 17:10:18 +00:00
tabset
termcap Backout my last changes. ISO-8859-15 does not specify ACS graphics. 2006-04-30 09:05:56 +00:00
timedef Add locales for nb_NO and nn_NO. 2006-11-09 18:10:34 +00:00
zoneinfo Update with the latest Bulletin C from IERS. 2007-02-02 09:19:27 +00:00
Makefile Reimplementation of world/kernel build options. For details, see: 2006-03-17 18:54:44 +00:00
Makefile.inc