From owner-cvs-all@FreeBSD.ORG Tue Jun 5 00:16:44 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1FF6E16A469; Tue, 5 Jun 2007 00:16:44 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 1264013C46A; Tue, 5 Jun 2007 00:16:44 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l550Ghbw093636; Tue, 5 Jun 2007 00:16:43 GMT (envelope-from jeff@repoman.freebsd.org) Received: (from jeff@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l550GhDH093630; Tue, 5 Jun 2007 00:16:43 GMT (envelope-from jeff) Message-Id: <200706050016.l550GhDH093630@repoman.freebsd.org> From: Jeff Roberson Date: Tue, 5 Jun 2007 00:16:43 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/amd64/amd64 cpu_switch.S X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2007 00:16:44 -0000 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