From owner-p4-projects@FreeBSD.ORG Thu Apr 27 22:11:32 2006 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 2F11B16A426; Thu, 27 Apr 2006 22:11:32 +0000 (UTC) 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 09B3516A400; Thu, 27 Apr 2006 22:11:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D93243D4C; Thu, 27 Apr 2006 22:11:31 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k3RMBS3b085855; Thu, 27 Apr 2006 18:11:29 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: John Birrell Date: Thu, 27 Apr 2006 17:49:15 -0400 User-Agent: KMail/1.9.1 References: <200604272036.k3RKaboJ076131@repoman.freebsd.org> In-Reply-To: <200604272036.k3RKaboJ076131@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604271749.17182.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1428/Thu Apr 27 14:39:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.1 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 96234 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, 27 Apr 2006 22:11:32 -0000 On Thursday 27 April 2006 16:36, John Birrell wrote: > http://perforce.freebsd.org/chv.cgi?CH=96234 > > Change 96234 by jb@jb_freebsd2 on 2006/04/27 20:36:19 > > Enable/disable interrupts. > > Affected files ... > > .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.c#9 edit > > Differences ... > > ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_hacks.c#9 (text+ko) ==== > > @@ -164,13 +164,13 @@ > dtrace_icookie_t > dtrace_interrupt_disable(void) > { > - printf("%s:\n",__FUNCTION__); > - return 0; > + disable_intr(); > + return (0); > } > void > dtrace_interrupt_enable(dtrace_icookie_t a) > { > - printf("%s:\n",__FUNCTION__); > + enable_intr(); > } > void > dtrace_getpcstack(pc_t *a, int b, int c, uint32_t *d) Please use intr_disable() and intr_restore() instead. You should make dtrace_icookie_t a register_t via typedef and everything will work fine. You could just do this: #define dtrace_icookie_t register_t #define dtrace_interrupt_disable intr_disable #define dtrace_interrupt_enable intr_restore This matches their API more closely and handles nested calls correctly. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org