kernel - Change lwp_fork() to not hold the mplock in the new thread
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Aug 2010 22:37:07 +0000 (15:37 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Aug 2010 22:37:07 +0000 (15:37 -0700)
commit2b0bd8aa71c8580bcfe166e5ab7331c0d5e821a9
treee1da38a2c965346792b4bf34c8204893014c26c0
parent145eb524f6b852c9b63e743866a5b5a6686d50dd
kernel - Change lwp_fork() to not hold the mplock in the new thread

* Change lwp_fork() to produce a mpsafe thread at startup instead of
  one with the mplock held.

* Change all fork_trampoline() functions and all kernel callbacks
  via cpu_set_fork_handler() to expect a thread without the
  mplock held.

* Adjust the thread procedures for aio etc (those not yet mpsafe)
  to acquire the mplock.
12 files changed:
sys/kern/init_main.c
sys/kern/kern_fork.c
sys/kern/vfs_aio.c
sys/netproto/smb/smb_iod.c
sys/platform/pc32/i386/exception.s
sys/platform/pc32/i386/trap.c
sys/platform/pc64/x86_64/exception.S
sys/platform/pc64/x86_64/trap.c
sys/platform/vkernel/i386/fork_tramp.s
sys/platform/vkernel/i386/trap.c
sys/platform/vkernel64/x86_64/fork_tramp.s
sys/platform/vkernel64/x86_64/trap.c