X-Git-Url: https://git.saurik.com/apple/libplatform.git/blobdiff_plain/ada7c4921d100a297d3be70d24c7fe9f43330c12..refs/heads/master:/internal/os/yield.h diff --git a/internal/os/yield.h b/internal/os/yield.h index a094b2d..a84ffff 100644 --- a/internal/os/yield.h +++ b/internal/os/yield.h @@ -39,7 +39,7 @@ _spins++; \ _os_preemption_yield(_spins); \ } } while (0) -#elif TARGET_OS_EMBEDDED +#else // #ifndef OS_WAIT_SPINS #define OS_WAIT_SPINS 1024 @@ -53,11 +53,6 @@ os_hardware_pause(); \ } \ } } while (0) -#else -#define _os_wait_until(c) do { \ - while (!(c)) { \ - os_hardware_pause(); \ - } } while (0) #endif #pragma mark - @@ -76,13 +71,7 @@ #pragma mark - #pragma mark _os_preemption_yield -#if defined(SWITCH_OPTION_OSLOCK_DEPRESS) && !(TARGET_IPHONE_SIMULATOR && \ - IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED < 1090) -#define OS_YIELD_THREAD_SWITCH_OPTION SWITCH_OPTION_OSLOCK_DEPRESS -#else -#define OS_YIELD_THREAD_SWITCH_OPTION SWITCH_OPTION_DEPRESS -#endif #define _os_preemption_yield(n) thread_switch(MACH_PORT_NULL, \ - OS_YIELD_THREAD_SWITCH_OPTION, (mach_msg_timeout_t)(n)) + SWITCH_OPTION_OSLOCK_DEPRESS, (mach_msg_timeout_t)(n)) #endif // __OS_YIELD__