From owner-cvs-all Tue Mar 6 18: 6:19 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 4987737B718; Tue, 6 Mar 2001 18:06:09 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f27269k65632; Tue, 6 Mar 2001 18:06:09 -0800 (PST) (envelope-from jhb) Message-Id: <200103070206.f27269k65632@freefall.freebsd.org> From: John Baldwin Date: Tue, 6 Mar 2001 18:06:09 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/sys mutex.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG jhb 2001/03/06 18:06:09 PST Modified files: sys/sys mutex.h Log: - Include for KASSERT(). - Move the _mtx_assert() prototype up to the top of the file with the rest of the function prototypes. - Define all the mtx_foo() macros in terms of mtx_foo_flags(). - Add a KASSERT() to check for invalid options in mtx_lock_flags(). - Move the mtx_assert() to ensure a mutex is owned before releasing it in front of WITNESS_EXIT() in all the mtx_unlock_* macros. - Change the MPASS* macros to be on #ifdef INVARIANTS, not just #ifdef MUTEX_DEBUG since most of them check to see that the mutex functions are called properly. Define MPASS4() in terms of KASSERT() to do this. - Define MPASS{,[23]} in terms of MPASS4() to simplify things and avoid code duplication. Revision Changes Path 1.27 +18 -73 src/sys/sys/mutex.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message