[libc-commits] [libc] [libc] Replace usage of GPU helpers with ones from 'gpuintrin.h' (PR #116454)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Fri Nov 15 20:08:49 PST 2024


================
@@ -30,6 +28,17 @@
 namespace LIBC_NAMESPACE_DECL {
 namespace rpc {
 
+/// Use scoped atomic variants if they are available for the target.
+#if !__has_builtin(__scoped_atomic_load_n)
+#define __scoped_atomic_load_n(src, ord, scp) __atomic_load_n(src, ord)
----------------
jhuber6 wrote:

The arguments will be passed to the atomic function, what's a possible incorrect usage? I feel like even if it's malformed it'll be contained to the function argument scope.

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


More information about the libc-commits mailing list