kernel - Fix p->p_lock race and remove unused procedures
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 10 Nov 2011 20:25:09 +0000 (12:25 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 10 Nov 2011 20:25:09 +0000 (12:25 -0800)
commite22b17d7f557c0e9481bc8962a5ac417e883e11a
tree91bf1763d34fc553030c9d8f97d6f63c4419fc48
parent5b3a7ef307b89d267152c9fdaa9ace30522afacc
kernel - Fix p->p_lock race and remove unused procedures

* Remove vm_waitproc() (move its vmspace_exitfree() call to the one place
  that calls vm_waitproc()).

* Remove cpu_proc_wait(), which only called pmap_dispose_proc().

* Remove pmap_dispose_proc(), which only had an (incorrect) assertion in it
  and otherwise did nothing.

* Wait for the p->p_lock count to drop to zero before calling
  vmspace_exitfree(), and then wait again afterwords now that there
  are absolutely no possible references to (p) left.
13 files changed:
sys/kern/kern_exit.c
sys/platform/pc32/i386/pmap.c
sys/platform/pc32/i386/vm_machdep.c
sys/platform/pc64/x86_64/pmap.c
sys/platform/pc64/x86_64/vm_machdep.c
sys/platform/vkernel/i386/vm_machdep.c
sys/platform/vkernel/platform/pmap.c
sys/platform/vkernel64/platform/pmap.c
sys/platform/vkernel64/x86_64/vm_machdep.c
sys/sys/proc.h
sys/vm/pmap.h
sys/vm/vm_extern.h
sys/vm/vm_glue.c