X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/cb3231590a3c94ab4375e2228bd5e86b0cf1ad7e..refs/heads/master:/osfmk/arm/locks.h diff --git a/osfmk/arm/locks.h b/osfmk/arm/locks.h index ce0e69e42..f1f9fd55a 100644 --- a/osfmk/arm/locks.h +++ b/osfmk/arm/locks.h @@ -37,8 +37,6 @@ #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 */ @@ -111,6 +109,8 @@ typedef struct _lck_mtx_ { #define LCK_FRAMES_MAX 8 extern uint64_t MutexSpin; +extern uint64_t low_MutexSpin; +extern int64_t high_MutexSpin; 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 - state = __builtin_arm_rsr64("DAIF"); // Read interrupt state + state = (long)__builtin_arm_rsr64("DAIF"); // Read interrupt 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__ - __builtin_arm_wsr64("DAIF", state); // Restore masks + __builtin_arm_wsr64("DAIF", (uint64_t)state); // Restore masks #endif }