The NetBSD Project

CVS log for src/sys/kern/kern_mutex.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.80 / (download) - annotate - [select for diffs], Fri Nov 29 19:44:59 2019 UTC (5 days, 22 hours ago) by ad
Branch: MAIN
CVS Tags: HEAD
Changes since 1.79: +16 -5 lines
Diff to previous 1.79 (colored) to selected 1.65 (colored)

Get rid of MUTEX_RECEIVE/MUTEX_GIVE.

Revision 1.79 / (download) - annotate - [select for diffs], Thu May 9 05:00:31 2019 UTC (6 months, 4 weeks ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RC1, netbsd-9
Changes since 1.78: +5 -5 lines
Diff to previous 1.78 (colored) to selected 1.65 (colored)

Avoid prepending a timestamp to lock debug outputs on ddb

Lock printer functions (lockops_t#lo_dump) use printf_nolog to print, but
printf_nolog now prepends a timestamp which is unnecessary for ddb:

    db{0}> show all locks/t
    [Locks tracked through LWPs]
    Locks held by an LWP (iperf):
    Lock 0 (initialized at soinit)
    lock address : 0xffffedeb84b06080 type     :     sleep/adaptive
    initialized  : 0xffffffff806d8c3f
    shared holds :                  0 exclusive:                  1
    shares wanted:                  0 exclusive:                 11
    current cpu  :                  0 last held:                  1
    current lwp  : 0xffffedeb849ff040 last held: 0xffffedeb7dfdb240
    last locked* : 0xffffffff806d8335 unlocked : 0xffffffff806d8385
    [ 79103.0868574] owner field  : 0xffffedeb7dfdb240 wait/spin:                1/0

Fix it by passing a printer function to lo_dump functions, i.e., make the
functions use db_printf on ddb.

Revision 1.78 / (download) - annotate - [select for diffs], Thu May 9 04:52:59 2019 UTC (6 months, 4 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.77: +4 -4 lines
Diff to previous 1.77 (colored) to selected 1.65 (colored)

Add missing "static" declaration

Revision 1.77 / (download) - annotate - [select for diffs], Wed Apr 17 02:29:43 2019 UTC (7 months, 2 weeks ago) by ozaki-r
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored) to selected 1.65 (colored)

Don't check pserialize_not_in_read_section after panic

It can cause a false positive assertion failure.

Revision 1.76 / (download) - annotate - [select for diffs], Sun Mar 10 12:49:48 2019 UTC (8 months, 3 weeks ago) by skrll
Branch: MAIN
Changes since 1.75: +6 -6 lines
Diff to previous 1.75 (colored) to selected 1.65 (colored)

Fix two oddities...

- remove extraneous semi-colons from do { } while (0) macro definitions
- actually wrap MUTEX_INITIALIZE_ADAPTIVE contents in do { }

Spotted by kre@

Revision 1.75 / (download) - annotate - [select for diffs], Fri Aug 31 01:23:57 2018 UTC (15 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored) to selected 1.65 (colored)

Sprinkle __predict_false to dedicated assertions of mutex and rwlock

Revision 1.74 / (download) - annotate - [select for diffs], Tue Aug 14 01:09:53 2018 UTC (15 months, 3 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.73: +4 -2 lines
Diff to previous 1.73 (colored) to selected 1.65 (colored)

Check pserialize_not_in_read_section for adaptive mutexes and rwlocks

The overhead of the checks is not negligible so they're turned on only if both
DEBUG and LOCKDEBUG are enabled.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Feb 25 18:54:29 2018 UTC (21 months, 1 week ago) by chs
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.72: +15 -2 lines
Diff to previous 1.72 (colored) to selected 1.65 (colored)

add defines to control whether or not mutex operations are skipped
after we have panic'd.  no functional change.

Revision 1.72 / (download) - annotate - [select for diffs], Tue Feb 6 07:46:24 2018 UTC (21 months, 4 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.71: +4 -2 lines
Diff to previous 1.71 (colored) to selected 1.65 (colored)

Check if adaptive mutex isn't called in interrupt context

By this check, we can notice this programming error without LOCKDEBUG.
The same check exists in rw_enter.

Revision 1.71 / (download) - annotate - [select for diffs], Mon Feb 5 04:25:04 2018 UTC (21 months, 4 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.70: +15 -7 lines
Diff to previous 1.70 (colored) to selected 1.65 (colored)

Obtain proper initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc

Initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc
were not useful because the addresses were mutex_obj_alloc or rw_obj_alloc
itself. What we want to know are callers of them.

Revision 1.70 / (download) - annotate - [select for diffs], Tue Jan 30 07:52:22 2018 UTC (22 months ago) by ozaki-r
Branch: MAIN
Changes since 1.69: +7 -7 lines
Diff to previous 1.69 (colored) to selected 1.65 (colored)

Apply C99-style struct initialization to syncobj_t

Revision 1.69 / (download) - annotate - [select for diffs], Thu Jan 18 08:40:56 2018 UTC (22 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored) to selected 1.65 (colored)

typo in comment

Revision 1.68 / (download) - annotate - [select for diffs], Mon Dec 25 09:13:40 2017 UTC (23 months, 1 week ago) by ozaki-r
Branch: MAIN
Changes since 1.67: +8 -8 lines
Diff to previous 1.67 (colored) to selected 1.65 (colored)

Apply C99-style struct initialization to lockops_t

Revision 1.67 / (download) - annotate - [select for diffs], Sat Sep 16 23:55:33 2017 UTC (2 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.66: +8 -7 lines
Diff to previous 1.66 (colored) to selected 1.65 (colored)

more const

Revision 1.66 / (download) - annotate - [select for diffs], Sat Sep 16 23:25:34 2017 UTC (2 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.65: +5 -5 lines
Diff to previous 1.65 (colored)

add missing const

Revision 1.65 / (download) - annotate - [selected], Mon May 1 21:35:25 2017 UTC (2 years, 7 months ago) by pgoyette
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: netbsd-8
Changes since 1.64: +22 -2 lines
Diff to previous 1.64 (colored)

Introduce mutex_ownable() to determine if it is possible for the current
process to acquire a mutex.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Jan 26 04:11:56 2017 UTC (2 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, nick-nhusb-base-20170204, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: prg-localcount2
Changes since 1.63: +8 -8 lines
Diff to previous 1.63 (colored) to selected 1.65 (colored)

For LOCKDEBUG:
Always provide the location of the caller of the lock as __func__, __LINE__.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Jul 7 06:55:43 2016 UTC (3 years, 4 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored) to selected 1.65 (colored)

KNF. Remove extra spaces. No functional change.

Revision 1.62 / (download) - annotate - [select for diffs], Mon May 25 21:02:37 2015 UTC (4 years, 6 months ago) by prlw1
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.61: +3 -3 lines
Diff to previous 1.61 (colored) to selected 1.65 (colored)

typo

Revision 1.61 / (download) - annotate - [select for diffs], Fri Nov 28 08:27:27 2014 UTC (5 years ago) by uebayasi
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.60: +3 -3 lines
Diff to previous 1.60 (colored) to selected 1.65 (colored)

Consistently use KPREEMPT_*() here.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Sep 19 17:52:43 2014 UTC (5 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.59: +37 -15 lines
Diff to previous 1.59 (colored) to selected 1.65 (colored)

Allow MD code to use something other than __cpu_simple_lock_t for doing spin
locks but use the same logic.

MUTEX_SPINBIT_LOCK_INIT
MUTEX_SPINBIT_LOCK_TRY
MUTEX_SPINBIT_LOCKED_P
MUTEX_SPINBIT_LOCK_UNLOCK
MUTEX_INITIALIZE_SPIN_IPL

For those platforms without sub-word CAS, you can use these to place the
mutex lock and ipl inside a full machine word and use CAS to update them.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Sep 5 05:57:21 2014 UTC (5 years, 3 months ago) by matt
Branch: MAIN
Changes since 1.58: +13 -13 lines
Diff to previous 1.58 (colored) to selected 1.65 (colored)

Don't next structure and enum definitions.
Don't use C++ keywords new, try, class, private, etc.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Oct 19 21:01:39 2013 UTC (6 years, 1 month ago) by mrg
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.57: +5 -2 lines
Diff to previous 1.57 (colored) to selected 1.65 (colored)

use __USE() where appropriate.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Sep 22 14:59:07 2013 UTC (6 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.56: +2 -8 lines
Diff to previous 1.56 (colored) to selected 1.65 (colored)

Remove redundant declaration of MUTEX_CLEAR_WAITERS without checking if
any of the !__HAVE_SIMPLE_MUTEX architectures need it based on the
assumption that HPPA is the only member of that category.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Sep 22 14:55:07 2013 UTC (6 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored) to selected 1.65 (colored)

Revert previous - it was wrong. hi joerg.

Revision 1.55 / (download) - annotate - [select for diffs], Sat Sep 14 13:19:18 2013 UTC (6 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.54: +3 -3 lines
Diff to previous 1.54 (colored) to selected 1.65 (colored)

MUTEX_CLEAR_WAITERS is only ever used by !__HAVE_SIMPLE_MUTEXES

Revision 1.54 / (download) - annotate - [select for diffs], Sat Apr 27 08:12:34 2013 UTC (6 years, 7 months ago) by mlelstv
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored) to selected 1.65 (colored)

Revert change that allowed rw_tryenter(&lock, RW_READER) to recurse
for vfs_busy(). This is no longer necessary.

Revision 1.53 / (download) - annotate - [select for diffs], Sat Feb 25 22:32:44 2012 UTC (7 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored) to selected 1.65 (colored)

{mutex,rw}_vector_enter: use macro versions to disable/enable preemption.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:52 2012 UTC (7 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: jmcneill-usbmp-base3
Changes since 1.51: +2 -21 lines
Diff to previous 1.51 (colored) to selected 1.65 (colored)

Remove COMPAT_SA / KERN_SA.  Welcome to 6.99.3!
Approved by core@.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Apr 11 19:11:08 2011 UTC (8 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.50: +4 -7 lines
Diff to previous 1.50 (colored) to selected 1.65 (colored)

G/C unused MUTEX_COUNT_BIAS (it was for VAX)

Revision 1.50 / (download) - annotate - [select for diffs], Sun Mar 20 23:19:16 2011 UTC (8 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.49: +45 -47 lines
Diff to previous 1.49 (colored) to selected 1.65 (colored)

Optimise mutex_onproc() and rw_onproc() by making them O(1), instead
of O(ncpu) for adaptive paths.  Add an LWP destructor, lwp_dtor() with
a comment describing the principle of this barrier.

Reviewed by yamt@ and ad@.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Feb 8 09:54:27 2010 UTC (9 years, 9 months ago) by skrll
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, jruoho-x86intr
Changes since 1.48: +9 -9 lines
Diff to previous 1.48 (colored) to selected 1.65 (colored)

Re-apply:

	Invert the sense of the bit to mark if LOCKDEBUG is enabled to
	disabled.

	This will help my fellow developers spot "use before initialised"
	problems that hppa picks up very well.

but fix the !LOCKDEBUG case by defining the "no debug" bits to zero so
they have no effect on lock stubs.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Feb 6 04:50:19 2010 UTC (9 years, 10 months ago) by cube
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.47: +9 -9 lines
Diff to previous 1.47 (colored) to selected 1.65 (colored)

Revert commit from Fri Feb  5 06:43:17 UTC 2010 by skrll:

      Invert the sense of the bit to mark if LOCKDEBUG is enabled to disabled.

      This will help my fellow developers spot "use before initialised" problems
      that hppa picks up very well.

It has to be done differently, because the semantics of mtx_owner in the non-
LOCKDEBUG case can vary significantly between archs, and thus it is not
possible to simply flip a bit to 1.

Ok core@, as at least i386 is unbootable right now.

Revision 1.47 / (download) - annotate - [select for diffs], Fri Feb 5 06:43:16 2010 UTC (9 years, 10 months ago) by skrll
Branch: MAIN
Changes since 1.46: +9 -9 lines
Diff to previous 1.46 (colored) to selected 1.65 (colored)

Invert the sense of the bit to mark if LOCKDEBUG is enabled to disabled.

This will help my fellow developers spot "use before initialised" problems
that hppa picks up very well.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Nov 4 13:29:45 2009 UTC (10 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.45: +3 -101 lines
Diff to previous 1.45 (colored) to selected 1.65 (colored)

Heave-ho mutex/rwlock object routines into separate modules -- they
don't have anything to do with the lock internals.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jan 25 04:45:14 2009 UTC (10 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.44: +5 -5 lines
Diff to previous 1.44 (colored) to selected 1.65 (colored)

mutex_vector_enter: few predictions.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Oct 15 06:51:20 2008 UTC (11 years, 1 month ago) by wrstuden
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, matt-nb5-mips64
Changes since 1.43: +21 -2 lines
Diff to previous 1.43 (colored) to selected 1.65 (colored)

Merge wrstuden-revivesa into HEAD.

Revision 1.43 / (download) - annotate - [select for diffs], Sat May 31 13:31:25 2008 UTC (11 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl
Branch point for: haad-dm
Changes since 1.42: +3 -8 lines
Diff to previous 1.42 (colored) to selected 1.65 (colored)

Use __noinline.

Revision 1.42 / (download) - annotate - [select for diffs], Sat May 31 13:15:21 2008 UTC (11 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.41: +5 -5 lines
Diff to previous 1.41 (colored) to selected 1.65 (colored)

LOCKDEBUG:

- Tweak it so it can also catch common errors with condition variables.
  The change to kern_condvar.c is not included in this commit and will
  come later.

- Don't call kmem_alloc() if operating in interrupt context, just fail
  the allocation and disable debugging for the object. Makes it safe
  to do mutex_init/rw_init/cv_init in interrupt context, when running
  a LOCKDEBUG kernel.

Revision 1.41 / (download) - annotate - [select for diffs], Mon May 19 17:06:02 2008 UTC (11 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: hpcarm-cleanup-nbase
Changes since 1.40: +2 -4 lines
Diff to previous 1.40 (colored) to selected 1.65 (colored)

Reduce ifdefs due to MULTIPROCESSOR slightly.

Revision 1.40 / (download) - annotate - [select for diffs], Tue May 6 17:11:45 2008 UTC (11 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored) to selected 1.65 (colored)

Allow rw_tryenter(&lock, RW_READER) to recurse, for vfs_busy().

Revision 1.39 / (download) - annotate - [select for diffs], Wed Apr 30 00:40:13 2008 UTC (11 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored) to selected 1.65 (colored)

mutex_vector_enter: fix a typo in a comment.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:03 2008 UTC (11 years, 7 months ago) by martin
Branch: MAIN
Changes since 1.37: +2 -9 lines
Diff to previous 1.37 (colored) to selected 1.65 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.37 / (download) - annotate - [select for diffs], Mon Apr 28 13:18:50 2008 UTC (11 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.36: +3 -2 lines
Diff to previous 1.36 (colored) to selected 1.65 (colored)

MUTEX_SPIN_SPLRAISE: add another __insn_barrier() for safety.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Apr 27 14:29:09 2008 UTC (11 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.35: +5 -4 lines
Diff to previous 1.35 (colored) to selected 1.65 (colored)

Minor fix for preemption safety.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Apr 22 14:46:35 2008 UTC (11 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.34: +4 -2 lines
Diff to previous 1.34 (colored) to selected 1.65 (colored)

mutex_owned, rw_read_held, rw_write_held, rw_lock_held: check for a NULL
pointer.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Apr 11 15:28:34 2008 UTC (11 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.33: +9 -5 lines
Diff to previous 1.33 (colored) to selected 1.65 (colored)

mutex_vector_enter: reduce reads of mtx_owner slightly.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Mar 28 22:19:39 2008 UTC (11 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.32: +6 -3 lines
Diff to previous 1.32 (colored) to selected 1.65 (colored)

mutex_vector_exit: add another panicstr check.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Mar 28 16:23:39 2008 UTC (11 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.31: +2 -5 lines
Diff to previous 1.31 (colored) to selected 1.65 (colored)

Remove dead code from previous.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Mar 27 19:11:05 2008 UTC (11 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.30: +103 -2 lines
Diff to previous 1.30 (colored) to selected 1.65 (colored)

Add code for dynamically allocated mutexes, as posted on tech-kern.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Jan 5 12:31:39 2008 UTC (11 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.29: +3 -10 lines
Diff to previous 1.29 (colored) to selected 1.65 (colored)

simple_lock_only_held() is gone.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jan 4 21:31:06 2008 UTC (11 years, 11 months ago) by xtraeme
Branch: MAIN
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored) to selected 1.65 (colored)

sys/lock.h is required now. ok ad

Revision 1.28 / (download) - annotate - [select for diffs], Fri Jan 4 21:18:09 2008 UTC (11 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.27: +4 -2 lines
Diff to previous 1.27 (colored) to selected 1.65 (colored)

Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Dec 24 14:57:56 2007 UTC (11 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.26: +5 -7 lines
Diff to previous 1.26 (colored) to selected 1.65 (colored)

Add back mutex_owner() for Solaris compat.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Dec 6 01:18:46 2007 UTC (12 years ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.25: +6 -11 lines
Diff to previous 1.25 (colored) to selected 1.65 (colored)

mutex_init: use 'if' instead of 'switch' to avoid complaints from the
compiler.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Dec 5 06:50:07 2007 UTC (12 years ago) by ad
Branch: MAIN
Changes since 1.24: +6 -2 lines
Diff to previous 1.24 (colored) to selected 1.65 (colored)

mutex_init: make MUTEX_DEFAULT + IPL_SOFT* return an adaptive mutex.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Nov 30 23:05:43 2007 UTC (12 years ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase
Branch point for: vmlocking2
Changes since 1.23: +6 -6 lines
Diff to previous 1.23 (colored) to selected 1.65 (colored)

Use membar_*().

Revision 1.23 / (download) - annotate - [select for diffs], Wed Nov 21 10:19:10 2007 UTC (12 years ago) by yamt
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.22: +39 -24 lines
Diff to previous 1.22 (colored) to selected 1.65 (colored)

make kmutex_t and krwlock_t smaller by killing lock id.
ok'ed by Andrew Doran.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:22 2007 UTC (12 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.21: +11 -5 lines
Diff to previous 1.21 (colored) to selected 1.65 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Nov 4 17:26:02 2007 UTC (12 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored) to selected 1.65 (colored)

fix typo in comment (greetings to ad, someone read your longwinded
prattling dissertation)

Revision 1.20 / (download) - annotate - [select for diffs], Fri Oct 19 12:16:42 2007 UTC (12 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored) to selected 1.65 (colored)

machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.19 / (download) - annotate - [select for diffs], Thu Oct 11 19:45:25 2007 UTC (12 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.18: +8 -5 lines
Diff to previous 1.18 (colored) to selected 1.65 (colored)

Merge from vmlocking:

- G/C spinlockmgr() and simple_lock debugging.
- Always include the kernel_lock functions, for LKMs.
- Slightly improved subr_lockdebug code.
- Keep sizeof(struct lock) the same if LOCKDEBUG.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Sep 21 19:14:12 2007 UTC (12 years, 2 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base
Branch point for: yamt-x86pmap
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (colored) to selected 1.65 (colored)

Include sys/cdefs.h first.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Sep 17 21:33:34 2007 UTC (12 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored) to selected 1.65 (colored)

__FUNCTION__ -> __func__

Revision 1.16 / (download) - annotate - [select for diffs], Mon Sep 10 11:34:10 2007 UTC (12 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.15: +7 -7 lines
Diff to previous 1.15 (colored) to selected 1.65 (colored)

Merge nick-csl-alignment.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:53 2007 UTC (12 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base5, nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, matt-armv6, jmcneill-pm
Changes since 1.14: +43 -20 lines
Diff to previous 1.14 (colored) to selected 1.65 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.14 / (download) - annotate - [select for diffs], Thu May 17 14:51:40 2007 UTC (12 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.13: +3 -49 lines
Diff to previous 1.13 (colored) to selected 1.65 (colored)

merge yamt-idlelwp branch.  asked by core@.  some ports still needs work.

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Mar 12 22:34:08 2007 UTC (12 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, reinoud-bufcleanup
Branch point for: thorpej-atomic
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored) to selected 1.65 (colored)

mutex_vector_enter: put a read memory barrier between the final check that
(1) the holder is no longer running and (2) the waiters bit is set. Needed
to ensure that the operations happen in the correct order.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Mar 12 02:19:14 2007 UTC (12 years, 8 months ago) by matt
Branch: MAIN
Branch point for: mjf-ufs-trans
Changes since 1.11: +7 -4 lines
Diff to previous 1.11 (colored) to selected 1.65 (colored)

Define/use MUTEX_COUNT_BIAS for those implementations that need one (like
vax).

Revision 1.11 / (download) - annotate - [select for diffs], Sat Mar 10 16:01:13 2007 UTC (12 years, 8 months ago) by ad
Branch: MAIN
Branch point for: vmlocking
Changes since 1.10: +8 -3 lines
Diff to previous 1.10 (colored) to selected 1.65 (colored)

Add a MUTEX_NODEBUG type that avoids allocating debugging resources for
the lock. To be used for e.g. struct vm_page until a better way is found.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Mar 9 14:08:26 2007 UTC (12 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.9: +3 -6 lines
Diff to previous 1.9 (colored) to selected 1.65 (colored)

mutex_onproc: remove unnecessary memory barriers.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Mar 4 21:06:13 2007 UTC (12 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored) to selected 1.65 (colored)

change an error message from:
	Mutex error: sched_unlock_idle: sched_unlock_idle
to
	Mutex error: sched_unlock_idle: sched_mutex not locked

Revision 1.8 / (download) - annotate - [select for diffs], Sat Mar 3 10:08:19 2007 UTC (12 years, 9 months ago) by itohy
Branch: MAIN
Changes since 1.7: +11 -7 lines
Diff to previous 1.7 (colored) to selected 1.65 (colored)

Remove extra space so that symbol renaming works properly.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Mar 2 13:14:12 2007 UTC (12 years, 9 months ago) by itohy
Branch: MAIN
Changes since 1.6: +5 -5 lines
Diff to previous 1.6 (colored) to selected 1.65 (colored)

kern_mutex.c:190: macro `MUTEX_RECEIVE' used without args
kern_mutex.c:199: macro `MUTEX_RECEIVE' used without args
kern_mutex.c:206: macro `MUTEX_GIVE' used without args

Revision 1.6 / (download) - annotate - [select for diffs], Mon Feb 26 19:11:28 2007 UTC (12 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.5: +9 -15 lines
Diff to previous 1.5 (colored) to selected 1.65 (colored)

- Nuke mutex_owner()
- mutex_getowner() -> mutex_owner()

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 26 09:20:53 2007 UTC (12 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.4: +20 -3 lines
Diff to previous 1.4 (colored) to selected 1.65 (colored)

implement priority inheritance.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Feb 15 15:49:27 2007 UTC (12 years, 9 months ago) by ad
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.3: +34 -4 lines
Diff to previous 1.3 (colored) to selected 1.65 (colored)

- Add a mutex_wakeup() which clears the waiters flag and wakes all waiters.
  Will be needed to fix a problem with mutexes on sparc.
- mutex_tryenter(): fix a false "locking against myself" error.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 10 21:07:52 2007 UTC (12 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.2: +13 -8 lines
Diff to previous 1.2 (colored) to selected 1.65 (colored)

- Add/correct comments.
- Print correct function name when an assertion triggers.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:30 2007 UTC (12 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.1: +864 -0 lines
Diff to previous 1.1 (colored) to selected 1.65 (colored)

Merge newlock2 to head.

Revision 1.1, Sun Mar 10 21:39:48 2002 UTC (17 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, thorpej-vnode-attr-base, thorpej-vnode-attr, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, rpaulo-netinet-merge-pcb-base, rpaulo-netinet-merge-pcb, newlock2-nbase, newlock2-base, nathanw_sa_before_merge, nathanw_sa_base, ktrace-lwp-base, ktrace-lwp, kqueue-base, kent-audio2-base, kent-audio2, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, gehenna-devsw, gdamore-uart-base, gdamore-uart, elad-kernelauth-nbase, eeh-devprop-base, eeh-devprop
Branch point for: yamt-lazymbuf, newlock2, newlock
FILE REMOVED

file kern_mutex.c was initially added on branch newlock.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>