]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
- Add a new argument to cpu_switch. This is a pointer to a mutex that
authorJeff Roberson <jeff@FreeBSD.org>
Tue, 5 Jun 2007 00:16:43 +0000 (00:16 +0000)
committerJeff Roberson <jeff@FreeBSD.org>
Tue, 5 Jun 2007 00:16:43 +0000 (00:16 +0000)
commit5d68dad32981b52cd0e3e051e6c04bd99d826669
treea501b57bc4254612654999e3ef249bfe1a41cce1
parentebb6b0c0ecff829db3502770a55c5d1ab90a8b9f
 - Add a new argument to cpu_switch.  This is a pointer to a mutex that
   oldthread should point at before we return.
 - When cpu_switch() is called the td_lock pointer in the old thread may
   point at the blocked lock.  This prevents other processors from
   switching into this thread while we're still switching out.  Wait
   until we're done deactivating the vmspace before we release the
   thread by assigning to td_lock.
 - Before we can activate the new vmspace we must make sure that the new
   thread is not assigned to the blocked lock.  It may be in the process
   of switching out on another cpu.  Spin until the new thread is
   available.
sys/amd64/amd64/cpu_switch.S