From owner-cvs-all Tue Jul 31 15: 7: 6 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5462137B401; Tue, 31 Jul 2001 15:06:57 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6VM6v670782; Tue, 31 Jul 2001 15:06:57 -0700 (PDT) (envelope-from jhb) Message-Id: <200107312206.f6VM6v670782@freefall.freebsd.org> From: John Baldwin Date: Tue, 31 Jul 2001 15:06:57 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_synch.c src/sys/sys systm.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG jhb 2001/07/31 15:06:57 PDT Modified files: sys/kern kern_synch.c sys/sys systm.h Log: Apply the cluebat to myself and undo the await() -> mawait() rename. The asleep() and await() functions split the functionality of msleep() up into two halves. Only the asleep() half (which is what puts the process on the sleep queue) actually needs the lock usually passed to msleep() held to prevent lost wakeups. await() does not need the lock held, so the lock can be released prior to calling await() and does not need to be passed in to the await() function. Typical usage of these functions would be as follows: mtx_lock(&foo_mtx); ... do stuff ... asleep(&foo_cond, PRIxx, "foowt", hz); ... mtx_unlock&foo_mtx); ... await(-1, -1); Inspired by: dillon on the couch at Usenix Revision Changes Path 1.150 +16 -32 src/sys/kern/kern_synch.c 1.147 +2 -3 src/sys/sys/systm.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message