[compiler-rt] [RTSan][Darwin] Adjust OSSpinLock/_os_nospin_lock interceptor and tests (PR #132867)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 16 14:34:10 PDT 2025


================
@@ -1113,6 +1113,14 @@ TEST(TestRtsanInterceptors, PthreadJoinDiesWhenRealtime) {
 #pragma clang diagnostic push
 // OSSpinLockLock is deprecated, but still in use in libc++
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#undef OSSpinLockLock
+extern "C" {
+typedef int32_t OSSpinLock;
+void OSSpinLockLock(volatile OSSpinLock *__lock);
+typedef volatile OSSpinLock *_os_nospin_lock_t;
----------------
davidtrevelyan wrote:

Would it be possible for the team to share some context about this line? I don't yet understand why we're aliasing a lock named `Spin` with a type that has the (seemingly contradictory) `nospin` in its name. Any insight much appreciated here.

https://github.com/llvm/llvm-project/pull/132867


More information about the llvm-commits mailing list