]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/interrupt.c
xnu-1456.1.26.tar.gz
[apple/xnu.git] / osfmk / ppc / interrupt.c
index 5ae0bc8f722d17ae723d718a92aebdc71f018af0..e1be2769da0b6c9987c7bc09289dcf47cea7fa05 100644 (file)
@@ -48,7 +48,7 @@
 #include <pexpert/pexpert.h>
 #include <sys/kdebug.h>
 
-perfCallback perfIntHook;                                              /* Pointer to CHUD trap hook routine */
+volatile perfCallback perfIntHook;                                             /* Pointer to CHUD trap hook routine */
 
 #if CONFIG_DTRACE
 #if (DEVELOPMENT || DEBUG )
@@ -87,8 +87,9 @@ struct savearea * interrupt(
 
        disable_preemption();
 
-       if(perfIntHook) {                                                       /* Is there a hook? */
-               if(perfIntHook(type, ssp, dsisr, dar) == KERN_SUCCESS) return ssp;      /* If it succeeds, we are done... */
+       perfCallback fn = perfIntHook;
+       if(fn) {                                                        /* Is there a hook? */
+               if(fn(type, ssp, dsisr, dar) == KERN_SUCCESS) return ssp;       /* If it succeeds, we are done... */
        }
        
 #if CONFIG_DTRACE