]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/arm/locks.h
xnu-7195.101.1.tar.gz
[apple/xnu.git] / osfmk / arm / locks.h
index ce0e69e4258035932a73b3848214c1164cd75d8f..f1f9fd55a5fb7a084ed89d6f4949285622ebcf2d 100644 (file)
@@ -37,8 +37,6 @@
 
 #ifdef  MACH_KERNEL_PRIVATE
 
 
 #ifdef  MACH_KERNEL_PRIVATE
 
-extern  unsigned int    LcksOpts;
-
 #define enaLkDeb                0x00000001      /* Request debug in default attribute */
 #define enaLkStat               0x00000002      /* Request statistic in default attribute */
 #define disLkRWPrio             0x00000004      /* Disable RW lock priority promotion */
 #define enaLkDeb                0x00000001      /* Request debug in default attribute */
 #define enaLkStat               0x00000002      /* Request statistic in default attribute */
 #define disLkRWPrio             0x00000004      /* Disable RW lock priority promotion */
@@ -111,6 +109,8 @@ typedef struct _lck_mtx_ {
 #define LCK_FRAMES_MAX  8
 
 extern uint64_t         MutexSpin;
 #define LCK_FRAMES_MAX  8
 
 extern uint64_t         MutexSpin;
+extern uint64_t         low_MutexSpin;
+extern int64_t          high_MutexSpin;
 
 typedef struct {
        unsigned int            type;
 
 typedef struct {
        unsigned int            type;
@@ -298,7 +298,7 @@ get_interrupts(void)
 #if __arm__
        __asm__ volatile ("mrs %[state], cpsr" :[state] "=r" (state));  // Read cpsr
 #else
 #if __arm__
        __asm__ volatile ("mrs %[state], cpsr" :[state] "=r" (state));  // Read cpsr
 #else
-       state = __builtin_arm_rsr64("DAIF");    // Read interrupt state
+       state = (long)__builtin_arm_rsr64("DAIF");    // Read interrupt state
 #endif
        return state;
 }
 #endif
        return state;
 }
@@ -319,7 +319,7 @@ restore_interrupts(long state)
 #if __arm__
        __asm__ volatile ("msr  cpsr, %[state]" :: [state] "r" (state) : "cc", "memory"); // Restore CPSR
 #elif __arm64__
 #if __arm__
        __asm__ volatile ("msr  cpsr, %[state]" :: [state] "r" (state) : "cc", "memory"); // Restore CPSR
 #elif __arm64__
-       __builtin_arm_wsr64("DAIF", state);     // Restore masks
+       __builtin_arm_wsr64("DAIF", (uint64_t)state);     // Restore masks
 #endif
 }
 
 #endif
 }