]> git.saurik.com Git - apple/libpthread.git/commitdiff
libpthread-454.80.2.tar.gz macos-112 v454.80.2
authorApple <opensource@apple.com>
Tue, 26 Jan 2021 19:09:29 +0000 (19:09 +0000)
committerApple <opensource@apple.com>
Tue, 26 Jan 2021 19:09:29 +0000 (19:09 +0000)
include/pthread/pthread.h
src/pthread.c
tests/Makefile
tests/pthread_jit_write_protection.c

index 5d52d71b20495c9e68f364d8ffccdf9fd48b92bd..ddf4ae96a182996e74043ca207e7c379dcaf3aca 100644 (file)
@@ -557,11 +557,11 @@ __API_AVAILABLE(macos(10.4), ios(2.0))
 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);
 
 /*!
index 57ff8e970e3935cc3b932fdd4ed295976155beb1..39f313105351f3eebce99a684c0ab6500e440acb 100644 (file)
@@ -1152,6 +1152,8 @@ pthread_setname_np(const char *name)
 
 }
 
+#if TARGET_OS_OSX
+
 void
 pthread_jit_write_protect_np(int enable)
 {
@@ -1171,6 +1173,8 @@ int pthread_jit_write_protect_supported_np()
        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)
index 1988e63431c87fdfa9e4aaf366519a29f272f4bd..f898cf7f5c14672669c8b03d84e825cc14a35cd9 100644 (file)
@@ -55,8 +55,11 @@ TARGETS += setrlimit_sigsegv
 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
index bb178761574b81b7a5d3f2d9a722500171aa4bb9..f3401196bef15eb5ee2d34b24c330d232d95be72 100644 (file)
 #include <ptrauth.h>
 #endif
 
+#include <TargetConditionals.h>
+
+#if !TARGET_OS_OSX
+#error "These tests are only expected to run on macOS"
+#endif // TARGET_OS_OSX
+
 T_GLOBAL_META(T_META_RUN_CONCURRENTLY(true));
 
 /* Enumerations */