From owner-cvs-all Mon Mar 5 22:17:10 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 30AF437B719; Mon, 5 Mar 2001 22:17:07 -0800 (PST) (envelope-from bmilekic@FreeBSD.org) Received: (from bmilekic@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f266H7u69208; Mon, 5 Mar 2001 22:17:07 -0800 (PST) (envelope-from bmilekic) Message-Id: <200103060617.f266H7u69208@freefall.freebsd.org> From: Bosko Milekic Date: Mon, 5 Mar 2001 22:17:06 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_sx.c src/sys/sys sx.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG bmilekic 2001/03/05 22:17:06 PST Modified files: sys/kern kern_sx.c sys/sys sx.h Log: - Add sx_descr description member to sx lock structure - Add sx_xholder member to sx struct which is used for INVARIANTS-enabled assertions. It indicates the thread that presently owns the xlock. - Add some assertions to the sx lock code that will detect the fatal API abuse: xlock --> xlock xlock --> slock which now works thanks to sx_xholder. Notice that the remaining two problematic cases: slock --> xlock slock --> slock (a little less problematic, but still recursion) will need to be handled by witness eventually, as they are more involved. Reviewed by: jhb, jake, jasone Revision Changes Path 1.2 +27 -7 src/sys/kern/kern_sx.c 1.2 +12 -8 src/sys/sys/sx.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message