summaryrefslogtreecommitdiffstats
path: root/share/man/man9/sx.9
Commit message (Collapse)AuthorAgeFilesLines
* Reword descriptions of asserting locks held without WITNESS.bdrewery2016-03-291-6/+11
| | | | | | | | | | | | This corrects an error in r296947 in that it is not possible to assert which thread holds a shared (or read) lock, but it is possible to assert that one is held. Just not very useful. MFC after: 1 week Submitted by: wblock, jhb Reviewed by: kib (earlier version), jhb, wblock Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5659
* Remove incorrect BUGS entry about asserting lock not held.bdrewery2016-03-161-6/+1
| | | | | | | For non-WITNESS< assertion support for SA_UNLOCKED was added in r125421 and made to panic in r126316. MFC after: 1 week
* Reword SX_NOADAPTIVE description to be clear that adaptive is default.bdrewery2016-03-141-7/+5
| | | | | | The default changed in r193011. MFC after: 1 week
* Properly sort Xr to silence mandoc warnings.dchagin2014-12-151-1/+1
| | | | | | Differential Revision: https://reviews.freebsd.org/D1314 Reviewed by: wblock MFC after: 1 Month
* Add _NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9).dchagin2014-12-131-1/+10
| | | | | | | | A _NEW flag passed to _init_flags() to avoid check for double-init. Differential Revision: https://reviews.freebsd.org/D1208 Reviewed by: jhb, wblock MFC after: 1 Month
* Constify arguments for locking KPIs where possible.pjd2011-11-161-3/+3
| | | | | | | This enables locking consumers to pass their own structures around as const and be able to assert locks embedded into those structures. Reviewed by: ed, kib, jhb
* Reverse the logic for ADAPTIVE_SX option and enable it by default.attilio2009-05-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | Introduce for this operation the reverse NO_ADAPTIVE_SX option. The flag SX_ADAPTIVESPIN to be passed to sx_init_flags(9) gets suppressed and the new flag, offering the reversed logic, SX_NOADAPTIVE is added. Additively implements adaptive spininning for sx held in shared mode. The spinning limit can be handled through sysctls in order to be tuned while the code doesn't reach the release, after which time they should be dropped probabilly. This change has made been necessary by recent benchmarks where it does improve concurrency of workloads in presence of high contention (ie. ZFS). KPI breakage is documented by __FreeBSD_version bumping, manpage and UPDATING updates. Requested by: jeff, kmacy Reviewed by: jeff Tested by: pho
* Bump .Dd for previous revision.brueffer2007-11-261-1/+1
|
* Update sx(9) lock manpage in order to add missing prototypes for functionattilio2007-11-251-2/+17
| | | | sx_slock_sig() and sx_xlock_sig() and their respective explanation.
* Rename the macros for assertion flags passed to sx_assert() from SX_* tojhb2007-05-191-13/+13
| | | | | | | SA_* to match mutexes and rwlocks. The old flags still exist for backwards compatiblity. Requested by: attilio
* Document sx_xholder().jhb2007-05-191-0/+12
|
* Document SX_RECURSE flag.jhb2007-05-191-0/+3
|
* Optimize sx locks to use simple atomic operations for the common cases ofjhb2007-03-311-4/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add some cross references to locking.9 from related pages.julian2007-03-301-0/+2
|
* Allow threads to atomically release rw and sx locks while waiting for anjhb2007-03-091-1/+11
| | | | | | | | | | | | | | | | | | | event. Locking primitives that support this (mtx, rw, and sx) now each include their own foo_sleep() routine. - Rename msleep() to _sleep() and change it's 'struct mtx' object to a 'struct lock_object' pointer. _sleep() uses the recently added lc_unlock() and lc_lock() function pointers for the lock class of the specified lock to release the lock while the thread is suspended. - Add wrappers around _sleep() for mutexes (mtx_sleep()), rw locks (rw_sleep()), and sx locks (sx_sleep()). msleep() still exists and is now identical to mtx_sleep(), but it is deprecated. - Rename SLEEPQ_MSLEEP to SLEEPQ_SLEEP. - Rewrite much of sleep.9 to not be msleep(9) centric. - Flesh out the 'RETURN VALUES' section in sleep.9 and add an 'ERRORS' section. - Add __nonnull(1) to _sleep() and msleep_spin() so that the compiler will warn if you try to pass a NULL wait channel. The functions already have a KASSERT to that effect.
* - Sort functions in the order that rwlock(9) and mutex(9) use.jhb2007-03-091-10/+9
| | | | | | | | | - Markup sx_unlock() as a function rather than saying it is a macro. The macro part is an implementation detail, and all the other sx_*lock() functions are actually macros, too. - Use the same style as rwlock(9) and mutex(9) to markup sx_assert() and SX_SYSINIT() with respect to headers and kernel options. - Add a missing MLINK.
* Document sx_xlocked(9).pjd2006-07-121-0/+7
| | | | Submitted by: ssouhlal
* Trim a couple of xrefs.jhb2006-04-191-2/+0
|
* Xref rwlock(9).glebius2006-02-011-1/+2
| | | | Reviewed by: ru
* Scheduled mdoc(7) sweep.ru2005-01-121-2/+2
|
* Make an attempt at explaining why sx(9) locks cannot be safely obtainedkeramida2005-01-051-0/+9
| | | | | | | | after acquiring a mutex(9). PR: docs/75571 Submitted by: darrenr Explanation by: jhb
* Document that sx_unlock() exists as a macro.darrenr2004-07-111-6/+23
| | | | | Remove redundant include file, <sys/kernel.h>, and clean up the function list at the top with the addition of a "Sx utility macro" section.
* Assorted markup, spelling, and grammar fixes.ru2004-06-161-2/+2
|
* - Clarify ambiguous statement about not being able to both slock and xlockjhb2004-02-241-4/+7
| | | | | | | | | a single lock at the same time. - Avoid using "own" to refer to holding either a shared or exclusive lock as it is only really correct for exclusive locks. - Reword the sentence about sleep-ability to read easier. Requested by: truckman (1)
* Document new 'what' value for sx_assert(9).pjd2004-02-041-1/+6
| | | | | | | | | | PS. There is a inconsistency in this manual page, because in non-WITNESS case sx_assert(9) does not panics, it only prints the warning. I haven't fixed this, because jhb@ is planing to replace those printf()s with panic()s. Reviewed by: jhb Approved by: jhb, scottl (mentor)
* Add "options INVARIANTS" and "options INVARIANT_SUPPORT" to thejkoshy2004-01-011-4/+14
| | | | | | | | synopsis, with supporting text in the body of the manual page. Add a cross-reference to panic(9) for completeness. Reviewed by: ru (synopsis changes)
* Make this manual page reflect the sources better.jkoshy2003-12-281-1/+1
| | | | | | - A #include of <sys/mutex.h> is no longer needed to use sx(9) (since 2001/05/01). - Use of the SX_SYSINIT() macro requires inclusion of '<sys/kernel.h>'
* Improve continuity of text.jkoshy2003-12-271-15/+14
|
* Get rid of duplicates.ru2003-09-141-1/+1
|
* Document the fact that one is allowed to sleep while holding an sx lock.harti2003-06-121-0/+2
| | | | Discussed with: jhb@
* mdoc(7) police: lint.ru2002-05-291-4/+8
|
* mdoc police: turn .PP back into .Ppfenner2002-04-171-1/+1
|
* Update the .Fn line for SX_SYSINIT to include the parameter types.davidc2002-04-121-1/+1
|
* - Add notes about SX_SYSINIT and MTX_SYSINIT in order to document thearr2002-04-021-2/+15
| | | | | recent additions of these macros. - Add in a MLINK to create SX_SYSINIT.9 and MTX_SYSINIT.9.
* Add mtx_pool(9) to the SEE ALSO section.dd2002-03-281-0/+1
| | | | Submitted by: Garrett Rooney <rooneg@electricjellyfish.net>
* mdoc(7) police: WITNESS is a #define, mark it as such.ru2001-11-211-2/+6
|
* mdoc(7) police: cosmetique.ru2001-11-211-4/+9
|
* Document sx_assert(9).jhb2001-10-231-1/+32
|
* Fixed wrong include in synopsis.bde2001-10-041-1/+1
|
* mdoc(7) police: Use the new .In macro for #include statements.ru2001-10-011-4/+4
|
* Common Mike adds see alsos from all of the synchronizationsilby2001-09-171-1/+3
| | | | man pages to their brethren.
* mdoc(7) police: bump document date.ru2001-08-141-1/+1
|
* Add missing commas.jasone2001-08-141-2/+2
|
* Add sx_try_upgrade() and sx_downgrade().jasone2001-08-131-0/+17
| | | | Submitted by: Alexander Kabaev <ak03@gte.com>
* Spell "FreeBSD" with "F" and "BSD" in uppercase.ru2001-08-131-1/+1
|
* Document sx_try_[sx]lock().jasone2001-08-071-0/+17
|
* Removed whitespace at end-of-line; no content changes. I simply didschweikh2001-07-141-3/+3
| | | | | | | | | | cd src/share; find man[1-9] -type f|xargs perl -pi -e 's/[ \t]+$//' BTW, what editors are the culprits? I'm using vim and it shows me whitespace at EOL in troff files with a thick blue block... Reviewed by: Silence from cvs diff -b MFC after: 7 days
* mdoc(7) police: removed final dot from the .Nd call.ru2001-04-041-1/+1
|
* - Both <sys/sx.h> and <sys/mutex.h> depend on <sys/types.h> andjhb2001-03-281-0/+3
| | | | | <sys/lock.h>. - <sys/sx.h> depends on <sys/mutex.h>.
* Implement shared/exclusive locks.jasone2001-03-051-0/+85
Reviewed by: bmilekic, jake, jhb
OpenPOWER on IntegriCloud