cvs commit: src/sys/amd64/amd64 cpu_switch.S

Jeff Roberson jeff at FreeBSD.org
Tue Jun 5 00:16:44 UTC 2007


jeff        2007-06-05 00:16:43 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/amd64      cpu_switch.S 
  Log:
   - 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.
  
  Revision  Changes    Path
  1.157     +27 -14    src/sys/amd64/amd64/cpu_switch.S


More information about the cvs-src mailing list