[libcxx-commits] [libcxx] [libc++] Use public os_sync API instead of private __ulock on newer Apple platforms (PR #182947)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 13 10:40:54 PDT 2026
================
@@ -15,18 +15,30 @@
# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500
# define _LIBCPP_USE_ULOCK
# endif
+# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 140400
+# define _LIBCPP_USE_OS_SYNC
+# endif
# elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
# if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000
# define _LIBCPP_USE_ULOCK
# endif
+# if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 170400
+# define _LIBCPP_USE_OS_SYNC
+# endif
# elif defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__)
# if __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000
# define _LIBCPP_USE_ULOCK
# endif
+# if __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 170400
+# define _LIBCPP_USE_OS_SYNC
+# endif
# elif defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__)
# if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000
# define _LIBCPP_USE_ULOCK
# endif
+# if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 100400
+# define _LIBCPP_USE_OS_SYNC
+# endif
# endif // __ENVIRONMENT_.*_VERSION_MIN_REQUIRED__
----------------
ldionne wrote:
Note to self: I think this might be an existing bug where on VisionOS, we don't use either ulock or the os_sync APIs, because of the way we fall through these macros. No action needed for this PR, I just want to record this.
https://github.com/llvm/llvm-project/pull/182947
More information about the libcxx-commits
mailing list