PERFORCE change 96234 for review
John Baldwin
jhb at freebsd.org
Thu Apr 27 22:11:32 UTC 2006
On Thursday 27 April 2006 16:36, John Birrell wrote:
> http://perforce.freebsd.org/chv.cgi?CH=96234
>
> Change 96234 by jb at 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 at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the p4-projects
mailing list