[libclc] [libclc] Add atomic_init, atomic_flag_clear and atomic_flag_test_and_set (PR #168329)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 21 09:49:18 PST 2025
================
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <clc/atomic/clc_atomic_flag_clear.h>
+#include <clc/atomic/clc_atomic_store.h>
+
+#define __CLC_ATOMIC_FLAG_FALSE 0
+
+#define __CLC_DEFINE_ATOMIC_FLAG_CLEAR(ADDRSPACE) \
+ _CLC_OVERLOAD _CLC_DEF void __clc_atomic_flag_clear( \
+ volatile ADDRSPACE int *Ptr, int MemoryOrder, int MemoryScope) { \
----------------
arsenm wrote:
clc versions at least shouldn't be volatile?
https://github.com/llvm/llvm-project/pull/168329
More information about the cfe-commits
mailing list