aboutsummaryrefslogtreecommitdiff
path: root/share/man/man9/sx.9
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-231-2/+0
| | | | | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit fa9896e082a1)
* sx: fix up manpage after r363113Mateusz Guzik2020-09-051-0/+1
| | | | | | | | | | No date change as there is no new information. Submitted by: sigsys@gmail.com Differential Revision: https://reviews.freebsd.org/D26341 Notes: svn path=/head/; revision=365367
* sx: remove SX_NOADAPTIVE from the man pageMateusz Guzik2020-07-111-6/+0
| | | | | | | The flag itself was removed in r341593 Notes: svn path=/head/; revision=363113
* Clean up the SYSINIT_FLAGS definitions for rwlock(9) and rmlock(9).Mark Johnston2017-11-211-3/+11
| | | | | | | | | | Avoid duplication in their macro definitions, and document them. No functional change intended. MFC after: 1 week Notes: svn path=/head/; revision=326060
* Reword descriptions of asserting locks held without WITNESS.Bryan Drewery2016-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 Notes: svn path=/head/; revision=297394
* Remove incorrect BUGS entry about asserting lock not held.Bryan Drewery2016-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 Notes: svn path=/head/; revision=296947
* Reword SX_NOADAPTIVE description to be clear that adaptive is default.Bryan Drewery2016-03-141-7/+5
| | | | | | | | | The default changed in r193011. MFC after: 1 week Notes: svn path=/head/; revision=296819
* Properly sort Xr to silence mandoc warnings.Dmitry Chagin2014-12-151-1/+1
| | | | | | | | | Differential Revision: https://reviews.freebsd.org/D1314 Reviewed by: wblock MFC after: 1 Month Notes: svn path=/head/; revision=275813
* Add _NEW flag to mtx(9), sx(9), rmlock(9) and rwlock(9).Dmitry Chagin2014-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 Notes: svn path=/head/; revision=275751
* Constify arguments for locking KPIs where possible.Pawel Jakub Dawidek2011-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 Notes: svn path=/head/; revision=227588
* Reverse the logic for ADAPTIVE_SX option and enable it by default.Attilio Rao2009-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 Notes: svn path=/head/; revision=193011
* Bump .Dd for previous revision.Christian Brueffer2007-11-261-1/+1
| | | | Notes: svn path=/head/; revision=173940
* Update sx(9) lock manpage in order to add missing prototypes for functionAttilio Rao2007-11-251-2/+17
| | | | | | | sx_slock_sig() and sx_xlock_sig() and their respective explanation. Notes: svn path=/head/; revision=173888
* Rename the macros for assertion flags passed to sx_assert() from SX_* toJohn Baldwin2007-05-191-13/+13
| | | | | | | | | | SA_* to match mutexes and rwlocks. The old flags still exist for backwards compatiblity. Requested by: attilio Notes: svn path=/head/; revision=169780
* Document sx_xholder().John Baldwin2007-05-191-0/+12
| | | | Notes: svn path=/head/; revision=169777
* Document SX_RECURSE flag.John Baldwin2007-05-191-0/+3
| | | | Notes: svn path=/head/; revision=169770
* Optimize sx locks to use simple atomic operations for the common cases ofJohn Baldwin2007-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 Notes: svn path=/head/; revision=168191
* Add some cross references to locking.9 from related pages.Julian Elischer2007-03-301-0/+2
| | | | Notes: svn path=/head/; revision=168071
* Allow threads to atomically release rw and sx locks while waiting for anJohn Baldwin2007-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. Notes: svn path=/head/; revision=167387
* - Sort functions in the order that rwlock(9) and mutex(9) use.John Baldwin2007-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. Notes: svn path=/head/; revision=167371
* Document sx_xlocked(9).Pawel Jakub Dawidek2006-07-121-0/+7
| | | | | | | Submitted by: ssouhlal Notes: svn path=/head/; revision=160300
* Trim a couple of xrefs.John Baldwin2006-04-191-2/+0
| | | | Notes: svn path=/head/; revision=157880
* Xref rwlock(9).Gleb Smirnoff2006-02-011-1/+2
| | | | | | | Reviewed by: ru Notes: svn path=/head/; revision=155193
* Scheduled mdoc(7) sweep.Ruslan Ermilov2005-01-121-2/+2
| | | | Notes: svn path=/head/; revision=140140
* Make an attempt at explaining why sx(9) locks cannot be safely obtainedGiorgos Keramidas2005-01-051-0/+9
| | | | | | | | | | | after acquiring a mutex(9). PR: docs/75571 Submitted by: darrenr Explanation by: jhb Notes: svn path=/head/; revision=139736
* Document that sx_unlock() exists as a macro.Darren Reed2004-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. Notes: svn path=/head/; revision=131985
* Assorted markup, spelling, and grammar fixes.Ruslan Ermilov2004-06-161-2/+2
| | | | Notes: svn path=/head/; revision=130582
* - Clarify ambiguous statement about not being able to both slock and xlockJohn Baldwin2004-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) Notes: svn path=/head/; revision=126202
* Document new 'what' value for sx_assert(9).Pawel Jakub Dawidek2004-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) Notes: svn path=/head/; revision=125422
* Add "options INVARIANTS" and "options INVARIANT_SUPPORT" to theJoseph Koshy2004-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) Notes: svn path=/head/; revision=124037
* Make this manual page reflect the sources better.Joseph Koshy2003-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>' Notes: svn path=/head/; revision=123918
* Improve continuity of text.Joseph Koshy2003-12-271-15/+14
| | | | Notes: svn path=/head/; revision=123891
* Get rid of duplicates.Ruslan Ermilov2003-09-141-1/+1
| | | | Notes: svn path=/head/; revision=120054
* Document the fact that one is allowed to sleep while holding an sx lock.Hartmut Brandt2003-06-121-0/+2
| | | | | | | Discussed with: jhb@ Notes: svn path=/head/; revision=116255
* mdoc(7) police: lint.Ruslan Ermilov2002-05-291-4/+8
| | | | Notes: svn path=/head/; revision=97493
* mdoc police: turn .PP back into .PpBill Fenner2002-04-171-1/+1
| | | | Notes: svn path=/head/; revision=94964
* Update the .Fn line for SX_SYSINIT to include the parameter types.Chad David2002-04-121-1/+1
| | | | Notes: svn path=/head/; revision=94474
* - Add notes about SX_SYSINIT and MTX_SYSINIT in order to document theAndrew R. Reiter2002-04-021-2/+15
| | | | | | | | recent additions of these macros. - Add in a MLINK to create SX_SYSINIT.9 and MTX_SYSINIT.9. Notes: svn path=/head/; revision=93680
* Add mtx_pool(9) to the SEE ALSO section.Dima Dorfman2002-03-281-0/+1
| | | | | | | Submitted by: Garrett Rooney <rooneg@electricjellyfish.net> Notes: svn path=/head/; revision=93337
* mdoc(7) police: WITNESS is a #define, mark it as such.Ruslan Ermilov2001-11-211-2/+6
| | | | Notes: svn path=/head/; revision=86723
* mdoc(7) police: cosmetique.Ruslan Ermilov2001-11-211-4/+9
| | | | Notes: svn path=/head/; revision=86722
* Document sx_assert(9).John Baldwin2001-10-231-1/+32
| | | | Notes: svn path=/head/; revision=85392
* Fixed wrong include in synopsis.Bruce Evans2001-10-041-1/+1
| | | | Notes: svn path=/head/; revision=84453
* mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov2001-10-011-4/+4
| | | | Notes: svn path=/head/; revision=84306
* Common Mike adds see alsos from all of the synchronizationMike Silbersack2001-09-171-1/+3
| | | | | | | man pages to their brethren. Notes: svn path=/head/; revision=83567
* mdoc(7) police: bump document date.Ruslan Ermilov2001-08-141-1/+1
| | | | Notes: svn path=/head/; revision=81633
* Add missing commas.Jason Evans2001-08-141-2/+2
| | | | Notes: svn path=/head/; revision=81616
* Add sx_try_upgrade() and sx_downgrade().Jason Evans2001-08-131-0/+17
| | | | | | | Submitted by: Alexander Kabaev <ak03@gte.com> Notes: svn path=/head/; revision=81599
* Spell "FreeBSD" with "F" and "BSD" in uppercase.Ruslan Ermilov2001-08-131-1/+1
| | | | Notes: svn path=/head/; revision=81588
* Document sx_try_[sx]lock().Jason Evans2001-08-071-0/+17
| | | | Notes: svn path=/head/; revision=81223