void pthread_yield_np(void);
__API_AVAILABLE(macos(10.16))
-__SPI_AVAILABLE(ios(14.0), tvos(14.0), watchos(7.0), bridgeos(5.0), driverkit(20.0))
+__API_UNAVAILABLE(ios, tvos, watchos, bridgeos, driverkit)
void pthread_jit_write_protect_np(int enabled);
__API_AVAILABLE(macos(10.16))
-__SPI_AVAILABLE(ios(14.0), tvos(14.0), watchos(7.0), bridgeos(5.0), driverkit(20.0))
+__API_UNAVAILABLE(ios, tvos, watchos, bridgeos, driverkit)
int pthread_jit_write_protect_supported_np(void);
/*!
}
+#if TARGET_OS_OSX
+
void
pthread_jit_write_protect_np(int enable)
{
return os_thread_self_restrict_rwx_is_supported();
}
+#endif // TARGET_OS_OSX
+
OS_ALWAYS_INLINE
static inline void
__pthread_add_thread(pthread_t t, mach_port_t self, bool from_mach_thread)
TARGETS += wq_limits
TARGETS += add_timer_termination
TARGETS += perf_contended_mutex_rwlock
+
+ifeq ($(PLATFORM),MacOSX)
TARGETS += pthread_jit_write_protection
pthread_jit_write_protection: CODE_SIGN_ENTITLEMENTS=pthread_jit_write_protection-entitlements.plist
+endif
# this should be CUSTOM_TARGETS, see "Compatibility defines" in Makefile.targets
OTHER_TARGETS := stackoverflow_crash