summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lock.c
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate the undocumented, experimental, non-delivering and highlyphk2000-03-161-16/+0
| | | | dangerous MAX_PERF option.
* Lock reporting and assertion changes.eivind1999-12-111-4/+8
| | | | | | | | | | | | | | | * lockstatus() and VOP_ISLOCKED() gets a new process argument and a new return value: LK_EXCLOTHER, when the lock is held exclusively by another process. * The ASSERT_VOP_(UN)LOCKED family is extended to use what this gives them * Extend the vnode_if.src format to allow more exact specification than locked/unlocked. This commit should not do any semantic changes unless you are using DEBUG_VFS_LOCKS. Discussed with: grog, mch, peter, phk Reviewed by: peter
* Correct a locking error in apause: It should always holdalc1999-11-111-14/+16
| | | | | | | | | the simple lock when it returns. Also, eliminate spinning on a uniprocessor. It's pointless. Submitted by: bde, Assar Westerlund <assar@sics.se>
* Fix process p_locks accounting. Conversions of the owner to LK_KERNPROCdillon1999-09-271-2/+5
| | | | | | caused p_locks to be improperly accounted. Submitted by: Tor.Egge@fast.no
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* When requesting an exclusive lock with LK_NOWAIT, do not panicmckusick1999-06-281-5/+7
| | | | | | | if LK_RECURSIVE is not set, as we will simply return that the lock is busy and not actually deadlock. This allows processes to use polling locks against buffers that they may already hold exclusively locked.
* Convert buffer locking from using the B_BUSY and B_WANTED flags to usingmckusick1999-06-261-2/+18
| | | | | | | lockmgr locks. This commit should be functionally equivalent to the old semantics. That is, all buffer locking is done with LK_EXCLUSIVE requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will be done in future commits.
* fix breakage for alphas.julian1999-03-151-2/+2
| | | | Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
* This solves a deadlock that can occur when read()ing into a file-mmap()julian1999-03-121-3/+24
| | | | | | | | | | | | space. When doing this, it is possible to for another process to attempt to get an exclusive lock on the vnode and deadlock the mmap/read combination when the uiomove() call tries to obtain a second shared lock on the vnode. There is still a potential deadlock situation with write()/mmap(). Submitted by: Matt Dillon <dillon@freebsd.org> Reviewed by: Luoqi Chen <luoqi@freebsd.org> Delimmitted by tag PRE_MATT_MMAP_LOCK and POST_MATT_MMAP_LOCK in kern/kern_lock.c kern/kern_subr.c
* Add 'options DEBUG_LOCKS', which stores extra information in structeivind1999-01-201-1/+25
| | | | | | | | lock, and add some macros and function parameters to make sure that the information get to the point where it can be put in the lock structure. While I'm here, add DEBUG_VFS_LOCKS to LINT.
* KNFize, by bde.eivind1999-01-101-1/+2
|
* Split DIAGNOSTIC -> DIAGNOSTIC, INVARIANTS, and INVARIANT_SUPPORT aseivind1999-01-081-9/+2
| | | | | | | | | discussed on -hackers. Introduce 'KASSERT(assertion, ("panic message", args))' for simple check + panic. Reviewed by: msmith
* Staticize.eivind1998-11-261-2/+2
|
* Really finish supporting compiling with `gcc -ansi'.bde1998-04-171-2/+2
|
* Some kern_lock code improvements. Add missing wakeup, and enabledyson1998-03-071-10/+43
| | | | disabling some diagnostics when memory or speed is at a premium.
* Include SIMPLELOCK_DEBUG functions even if SMP if compiling LINT; giveeivind1998-02-111-2/+6
| | | | an error for the combination if _not_ compiling LINT.
* Back out DIAGNOSTIC changes.eivind1998-02-061-3/+1
|
* Turn DIAGNOSTIC into a new-style option.eivind1998-02-041-1/+3
|
* Remove a bunch of variables which were unused both in GENERIC and LINT.phk1997-11-071-3/+1
| | | | Found by: -Wunused
* Removed unused #includes.bde1997-10-281-5/+1
|
* Change the M_NAMEI allocations to use the zone allocator. This changedyson1997-09-211-77/+85
| | | | | | | | plus the previous changes to use the zone allocator decrease the useage of malloc by half. The Zone allocator will be upgradeable to be able to use per CPU-pools, and has more intelligent usage of SPLs. Additionally, it has reasonable stats gathering capabilities, while making most calls inline.
* typo in comment.phk1997-08-221-2/+2
|
* Allow lockmgr to work without a current process. Disallowing thatdyson1997-08-191-3/+4
| | | | was a mistake in the lockmgr rewrite.
* Added includes of smp.h for SMP.fsmp1997-08-181-1/+5
| | | | This eliminates a bazillion warnings about implicit s_lock & friends.
* Fix kern_lock so that it will work. Additionally, clean-up some of thedyson1997-08-181-132/+144
| | | | | | | | VM systems usage of the kernel lock (lockmgr) code. This is a first pass implementation, and is expected to evolve as needed. The API for the lock manager code has not changed, but the underlying implementation has changed significantly. This change should not materially affect our current SMP or UP code without non-standard parameters being used.
* pushed down "volatility" of simplelock to actual int inside the struct.fsmp1997-08-041-5/+5
| | | | Submitted by: bde@zeta.org.au, smp@csn.net
* Fixed commented-out Lite2 sysctl debug.lockpausetime.bde1997-04-011-5/+6
| | | | Removed unused #includes.
* Add missing $Id$peter1997-03-251-0/+1
| | | | Note; the RCS file has also been reconstructed to have a CSRG vendor branch.
* Replace original rev 1.3; Author: bde; Date: 1997/02/25 17:24:43;peter1997-03-251-3/+2
| | | | | Fix counting of simplelocks in SIMPLELOCK_DEBUG Fix style regression
* Replace original rev 1.2; Author: mpp; Date: 1997/02/12 06:52:30peter1997-03-251-0/+1
| | | | Add missing #include <sys/systm.h>
* Replace original revision 1.1; Author dyson; Date: 1997/02/10 02:28:15peter1997-03-251-8/+14
| | | | | | | Changes from Lite2: - DEBUG -> SIMPLELOCK_DEBUG - cosmetic fixes - bzero of lock at init time -> explicit init of members.
* Import 4.4BSD-Lite2 onto CSRG branchpeter1997-03-251-0/+531
OpenPOWER on IntegriCloud