[compiler-rt] [TSan] Add interceptor for os_unfair_lock_lock_with_flags (PR #153815)
Julian Lettner via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 18 18:51:30 PDT 2025
================
@@ -15,6 +16,18 @@ void *Thread(void *a) {
return NULL;
}
+#if defined(__MAC_15_0)
+void *ThreadWithFlags(void *a) {
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wunguarded-availability-new"
+ os_unfair_lock_lock_with_flags(&lock, OS_UNFAIR_LOCK_FLAG_ADAPTIVE_SPIN);
----------------
yln wrote:
Nit: This test code here is "normal" code. I think we should try to use `__builtin_available()` which the proper way to guard calls to new API, i.e., what user code would do.
https://github.com/llvm/llvm-project/pull/153815
More information about the llvm-commits
mailing list