[compiler-rt] [tsan] Add symbol for `__atomic_is_lock_free` (PR #218809)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 16:50:25 PDT 2026
================
@@ -0,0 +1,85 @@
+// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
+#include <atomic>
+#include <cassert>
+#include <cstddef>
+#include <cstdint>
+#include <cstdio>
+
+struct alignas(16) Large {
+ char data[16];
+};
+
+struct Huge {
+ char data[32];
+};
+
+extern "C" bool __atomic_is_lock_free(size_t size, const volatile void *ptr);
----------------
zhangweize9-cyber wrote:
Why using `extern "C"`? `__atomic_is_lock_free` is a [built-in](https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html#index-_005f_005fatomic_005fis_005flock_005ffree) function for gcc.
https://github.com/llvm/llvm-project/pull/218809
More information about the llvm-commits
mailing list