Fix a number of mp_lock issues. I had outsmarted myself trying to deal with
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 25 Sep 2003 23:49:09 +0000 (23:49 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 25 Sep 2003 23:49:09 +0000 (23:49 +0000)
commit71ef2f5c3756387544935bb441f68bb03b8dcd7f
tree1dba400275ae27a6fa76de9e9e80db6ec065f8a7
parenta7cf0021704da1d65a6fb3461e9ed1d825c4c628
Fix a number of mp_lock issues.  I had outsmarted myself trying to deal with
td->td_mpcount / mp_lock races.  The new rule is: you first modify
td->td_mpcount, then you deal with mp_lock assuming that an interrupt might
have already dealt with it for you, and various other pieces of code
deal with the race if an interrupt occurs in the middle of the above two
data accesses.
14 files changed:
sys/i386/apic/apic_vector.s
sys/i386/i386/mp_machdep.c
sys/i386/i386/mplock.s
sys/i386/i386/swtch.s
sys/i386/isa/apic_vector.s
sys/i386/isa/ipl.s
sys/kern/kern_intr.c
sys/kern/lwkt_thread.c
sys/platform/pc32/apic/apic_vector.s
sys/platform/pc32/i386/mp_machdep.c
sys/platform/pc32/i386/mplock.s
sys/platform/pc32/i386/swtch.s
sys/platform/pc32/isa/apic_vector.s
sys/platform/pc32/isa/ipl.s