[libc-commits] [libc] [libc] Allow RPC doorbells when compiling with MSVC (PR #245843)

Yaxun Liu via libc-commits libc-commits at lists.llvm.org
Tue Nov 24 18:53:27 PST 2026


================
@@ -34,6 +34,10 @@
   _InterlockedOr((volatile long *)(src), (long)(val))
 #define __scoped_atomic_fetch_and(src, val, ord, scp)                          \
   _InterlockedAnd((volatile long *)(src), (long)(val))
+#define __scoped_atomic_fetch_add(src, val, ord, scp)                          \
+  _InterlockedExchangeAdd64((volatile __int64 *)(src), (__int64)(val))
----------------
yxsamliu wrote:

The 32-bit x86 MSVC build fails here because `_InterlockedExchangeAdd64` is unavailable. Could you add an x86 fallback that updates all 64 bits?

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


More information about the libc-commits mailing list