From owner-p4-projects@FreeBSD.ORG Fri Sep 2 20:33:44 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 6699616A421; Fri, 2 Sep 2005 20:33:44 +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 3DD1916A41F for ; Fri, 2 Sep 2005 20:33:44 +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 0FC8C43D45 for ; Fri, 2 Sep 2005 20:33:44 +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 j82KXhvR076593 for ; Fri, 2 Sep 2005 20:33:43 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j82KXhxY076590 for perforce@freebsd.org; Fri, 2 Sep 2005 20:33:43 GMT (envelope-from jhb@freebsd.org) Date: Fri, 2 Sep 2005 20:33:43 GMT Message-Id: <200509022033.j82KXhxY076590@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 83044 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: Fri, 02 Sep 2005 20:33:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=83044 Change 83044 by jhb@jhb_slimer on 2005/09/02 20:33:00 Add a static mutex and also ensure that we enter the debugger after both initializing and destroying the locks. Affected files ... .. //depot/projects/smpng/sys/modules/sx_sysinit/sx_sysinit.c#2 edit Differences ... ==== //depot/projects/smpng/sys/modules/sx_sysinit/sx_sysinit.c#2 (text+ko) ==== @@ -34,18 +34,32 @@ */ #include +#include #include #include #include +#include #include -struct sx foo; +static struct sx foo; +static struct mtx bar; + SX_SYSINIT(foo_sx, &foo, "foo sx"); +MTX_SYSINIT(bar_mtx, &bar, "bar mtx", MTX_DEF); + +static void +mod_unload(void *dummy) +{ + + kdb_enter("unload"); +} +SYSUNINIT(mod_unload, SI_SUB_CONSOLE, SI_ORDER_FIRST, mod_unload, NULL); static int load(void *arg) { + kdb_enter("load"); return (0); }