[compiler-rt] [tsan] Add symbol for `__atomic_is_lock_free` (PR #218809)

via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 13 03:35:20 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:

> The following built-in functions approximately match the requirements for the C++11 memory model. They are all identified by being prefixed with ‘__atomic’ and most are overloaded so that they work with multiple types.

I just saw that this is based on the C++11 standard.......

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


More information about the llvm-commits mailing list