From owner-cvs-src@FreeBSD.ORG Thu Dec 29 20:57:47 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D028516A41F; Thu, 29 Dec 2005 20:57:47 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6C4C43D8F; Thu, 29 Dec 2005 20:57:45 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jBTKvj1s082985; Thu, 29 Dec 2005 20:57:45 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jBTKvj7w082984; Thu, 29 Dec 2005 20:57:45 GMT (envelope-from jhb) Message-Id: <200512292057.jBTKvj7w082984@repoman.freebsd.org> From: John Baldwin Date: Thu, 29 Dec 2005 20:57:45 +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/kern kern_synch.c src/sys/sys systm.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2005 20:57:48 -0000 jhb 2005-12-29 20:57:45 UTC FreeBSD src repository Modified files: sys/kern kern_synch.c sys/sys systm.h Log: Add a new function msleep_spin() which is a slightly stripped down version of msleep(). msleep_spin() doesn't support changing the priority of the thread while it is asleep nor does it support interruptible sleeps (PCATCH) or the PDROP flag. It does support timeouts however. It differs from msleep() in that the passed in mutex is a spin mutex. This means one can use msleep_spin() and wakeup() with a spin mutex similar to msleep() and wakeup() with a regular mutex. Note that the spin mutex in question needs to come before sched_lock and the sleepq locks in lock order. Revision Changes Path 1.272 +164 -0 src/sys/kern/kern_synch.c 1.237 +1 -0 src/sys/sys/systm.h