From owner-p4-projects@FreeBSD.ORG Thu Dec 8 22:03:04 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5EB2916A422; Thu, 8 Dec 2005 22:03:04 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2641016A41F for ; Thu, 8 Dec 2005 22:03:04 +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 E284143D4C for ; Thu, 8 Dec 2005 22:03:03 +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 jB8M32oc022052 for ; Thu, 8 Dec 2005 22:03:02 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jB8M32qV022049 for perforce@freebsd.org; Thu, 8 Dec 2005 22:03:02 GMT (envelope-from jhb@freebsd.org) Date: Thu, 8 Dec 2005 22:03:02 GMT Message-Id: <200512082203.jB8M32qV022049@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 87906 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2005 22:03:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=87906 Change 87906 by jhb@jhb_slimer on 2005/12/08 22:02:02 Add an event for testing show mtx and show sx. Affected files ... .. //depot/projects/smpng/sys/modules/crash/crash.c#22 edit Differences ... ==== //depot/projects/smpng/sys/modules/crash/crash.c#22 (text+ko) ==== @@ -83,6 +83,23 @@ /* Events. */ +static void +ddblock_test(void) +{ + + mtx_lock(&test1_mtx); + kdb_enter("test1_mtx locked"); + mtx_unlock(&test1_mtx); + sx_slock(&foo); + kdb_enter("foo slocked"); + sx_sunlock(&foo); + sx_xlock(&foo); + kdb_enter("foo xlocked"); + sx_xunlock(&foo); + kdb_enter("both unlocked"); +} +CRASH_EVENT("ddb lock commands", ddblock_test); + #ifdef WITNESS static void spinlock_test(void)