Date: Thu, 27 Apr 2006 17:49:15 -0400 From: John Baldwin <jhb@freebsd.org> To: John Birrell <jb@freebsd.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 96234 for review Message-ID: <200604271749.17182.jhb@freebsd.org> In-Reply-To: <200604272036.k3RKaboJ076131@repoman.freebsd.org> References: <200604272036.k3RKaboJ076131@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604271749.17182.jhb>