From owner-cvs-src-old@FreeBSD.ORG Wed Jan 21 04:22:24 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 983391065675 for ; Wed, 21 Jan 2009 04:22:24 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 853508FC08 for ; Wed, 21 Jan 2009 04:22:24 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n0L4MOQu018191 for ; Wed, 21 Jan 2009 04:22:24 GMT (envelope-from thompsa@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n0L4MOWT018190 for cvs-src-old@freebsd.org; Wed, 21 Jan 2009 04:22:24 GMT (envelope-from thompsa@repoman.freebsd.org) Message-Id: <200901210422.n0L4MOWT018190@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to thompsa@repoman.freebsd.org using -f From: Andrew Thompson Date: Wed, 21 Jan 2009 04:19:18 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern subr_witness.c src/sys/sys lock.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 04:22:24 -0000 thompsa 2009-01-21 04:19:18 UTC FreeBSD src repository Modified files: sys/kern subr_witness.c sys/sys lock.h Log: SVN rev 187511 on 2009-01-21 04:19:18Z by thompsa Add functions WITNESS so it can be asserted that the lock is not released for a section of code, this uses WITNESS_NORELEASE() and WITNESS_RELEASEOK() to mark the boundaries. Both functions require the lock to be held when calling. This is intended for scenarios like a bus asserting that the bus lock is not dropped during a driver call. There doesn't appear to be a man page to document this in. Reviewed by: jhb Revision Changes Path 1.264 +49 -0 src/sys/kern/subr_witness.c 1.76 +10 -0 src/sys/sys/lock.h