]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
- Add a new argument to cpu_switch. This is a pointer to a mutex that
authorjeff <jeff@FreeBSD.org>
Tue, 5 Jun 2007 00:16:43 +0000 (00:16 +0000)
committerjeff <jeff@FreeBSD.org>
Tue, 5 Jun 2007 00:16:43 +0000 (00:16 +0000)
commitf042fda7ca24340082a6234f26b99a67d86f9650
treea501b57bc4254612654999e3ef249bfe1a41cce1
parentebaff183844e51dd5e376e11a3e5b1e9ededca7c
 - 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