summaryrefslogtreecommitdiffstats
path: root/share/man/man9/mutex.9
Commit message (Collapse)AuthorAgeFilesLines
* Add some cross references to locking.9 from related pages.julian2007-03-301-0/+1
|
* Allow threads to atomically release rw and sx locks while waiting for anjhb2007-03-091-1/+13
| | | | | | | | | | | | | | | | | | | 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.
* Place mtx_destroy() and rw_destroy() right after mtx_init() and rw_init()jhb2007-03-091-3/+3
| | | | to match sx(9) and condvar(9).
* Document MTX_NOPROFILE flag.pjd2006-12-211-1/+3
|
* Replace a reference to no longer existing MUTEX_PROFILING(9) withru2006-11-111-1/+1
| | | | a LOCK_PROFILING(9).
* o Fix MTX_SYSINIT prototype.maxim2006-07-091-1/+1
| | | | | | PR: kern/99956 Submitted by: Arne Woerner MFC after: 1 week
* Xref rwlock(9).glebius2006-02-011-1/+2
| | | | Reviewed by: ru
* Various and sundry improvements:jhb2005-09-131-49/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace 'process' with 'thread' everywhere. - Update several places to note that that the fact that default mutexes may adaptively spin isn't necessarily MD, but is just part of the implementation as a whole. - Clarify the text about MTX_SPIN mutexes only being appropriate for INTR_FAST interrupts or other low level scheduler code to make the jargon more FreeBSD-ish rather than BSD/OS-ish. - Also, note that it is possible that interrupts aren't blocked but just deferred when a spin lock is held (the whole blocked vs. deferred bit is an MD implementation detail). - Remove statements saying that spin locks must be released in the exact opposite order that they were acquired. This stopped being true several years ago when we first added critical sections that stored their state in the current thread rather than in struct mtx. - Note that a mutex must be initialized before it is passed to any other mutex function, not just mtx_lock. - Clarify that mtx_trylock() only operates on MTX_DEF mutexes. - Simplify the text about possible preemption during a mtx_unlock(). - Use complete English sentences in place of phrases in a few places. - Clarify that it isn't ever safe to sleep with a mutex held. The kernel tends to panic when you do that. Requested by: scottl (7) MFC after: 3 days
* Don't say that mtx_lock() will "sleep" if another kernel thread isru2005-02-151-2/+2
| | | | | | | | holding the mutex, say it will "block". Later in this manual page we say that sleeping while holding a mutex isn't allowed, and this can be confusing. Submitted by: jhb
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Fixed the misplaced $FreeBSD$.ru2005-02-091-11/+11
|
* "non-spin" is better with a dash, than without.keramida2005-01-061-1/+1
|
* Fix the NAME section making whatis(1) happy in particular.ru2004-07-051-1/+1
|
* Mechanically kill hard sentence breaks and double whitespaces.ru2004-07-031-2/+2
|
* Assorted markup, spelling, and grammar fixes.ru2004-06-161-2/+2
|
* Add a cross-reference to MUTEX_PROFILING(9).des2004-01-251-0/+1
|
* Add "options INVARIANTS" and "options INVARIANT_SUPPORT" to thejkoshy2004-01-011-3/+11
| | | | | | | | 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)
* Use of the MTX_SYSINIT macro requires the inclusion of <sys/kernel.h>.jkoshy2003-12-281-0/+1
|
* Typo fix.jkoshy2003-12-111-1/+1
|
* Assorted mdoc(7), grammar, spelling, and punctuation fixes.ru2003-05-211-6/+17
| | | | Approved by: re (blanket)
* Back out revision 1.34 until we can come up with a more accurate patch.chris2003-02-171-65/+0
|
* Add a section on Giant lock manipulation macros.chris2003-02-171-0/+65
| | | | | Submitted by: Hiten M. Pandya <hiten@angelica.unixdaemons.com> Reviewed by: bmilekic
* Add some documentation of FreeBSD's special synchronization quirksgallatin2002-10-211-0/+20
| | | | | | | which may surprise developers coming from Solaris, or other platforms which have a similar interface, but slightly different rules. Reviewed by: jhb, ru
* Remove all mention of MTX_NOSWITCH. It was obsoleted a long time ago.jhb2002-09-241-36/+7
|
* Document MTX_DUPOKdavidc2002-06-061-3/+3
| | | | Requested by: jeff (long ago)
* mdoc(7) police: lint.ru2002-05-291-3/+4
|
* Remove a duplicate description of the type parameter for mtx_init.davidc2002-04-121-4/+0
| | | | Noticed by: scottl
* Add text describing the new type parameter, and rename descriptiondavidc2002-04-121-6/+17
| | | | to name as that is what it is called in mutex.h.
* Document the lock type argument of mtx_init().scottl2002-04-121-1/+5
|
* Update the .Fn line for MTX_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-1/+13
| | | | | 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>
* ispell sweep of share/man/man9/*.mpp2002-01-091-2/+2
|
* mdoc(7) police: Use the new .In macro for #include statements.ru2001-10-011-3/+3
|
* Common Mike adds see alsos from all of the synchronizationsilby2001-09-171-0/+3
| | | | man pages to their brethren.
* mdoc(7) police: Please don't commit when you are drunk!ru2001-09-041-3/+1
| | | | (Committer rules candidate.)
* From Mike Silbersack's message on cvs-commits:logo2001-09-021-0/+4
| | | | | > > Doh! There is a sx man page, the mutex man page just doesn't have a SEE > > ALSO pointing to sx(9). Could some mdoc madman go add one?
* mdoc(7) police: s;BSD/OS;.Bsx; where appropriate.ru2001-08-131-2/+2
|
* can not -> cannotsheldonh2001-08-081-1/+1
|
* Removed whitespace at end-of-line; no content changes. I simply didschweikh2001-07-141-8/+8
| | | | | | | | | | 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
* s/mtx_try_enter/mtx_trylock/dd2001-05-061-1/+1
|
* - Document mtx_initialized().jhb2001-03-301-7/+18
| | | | | - Document that MTX_QUIET can be passed to mtx_init() and the new flag MTX_NOWITNESS.
* Fixed wrong include in synopsis. <sys/param.h> is a prerequisite forbde2001-03-291-5/+5
| | | | | | | | <sys/mutex.h> due to #include spam in <sys/mutex.h>. (More precisely, <sys/time.h> is the prerequisite, but that is provided by standard #include spam in <sys/param.h>.) Fixed bitrot in prototype for mtx_init().
* - Both <sys/sx.h> and <sys/mutex.h> depend on <sys/types.h> andjhb2001-03-281-0/+2
| | | | | <sys/lock.h>. - <sys/sx.h> depends on <sys/mutex.h>.
* mdoc(7) cleanup.ru2001-02-121-26/+34
|
* Catch up to mutex API changes.bmilekic2001-02-121-145/+214
|
* mtx_try_enter() returns an int, not void.jhb2001-02-021-1/+1
|
* Remove MUTEX_DECLARE() and MTX_COLD. Instead, postpone full mutexjasone2001-01-211-39/+1
| | | | | | | | initialization until after malloc() is safe to call, then iterate through all mutexes and complete their initialization. This change is necessary in order to avoid some circular bootstrapping dependencies.
* mdoc(7) police: add a missing .Os, change the list type to ``tagged''.ru2000-12-141-11/+10
|
* Document the MA_RECURSED and MA_NOTRECURSED assertion flags as well asjhb2000-12-131-0/+15
| | | | the MTX_QUIET flag.
OpenPOWER on IntegriCloud