[libc-commits] [PATCH] D145608: [libc] Add intrinsic for thread fence to the atomic support
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Mar 8 20:28:00 PST 2023
jhuber6 added inline comments.
================
Comment at: libc/src/__support/CPP/atomic.h:97
+inline void atomic_thread_fence(MemoryOrder mem_ord) {
+ __atomic_thread_fence(int(mem_ord));
+}
----------------
lntue wrote:
> Do we need a guard to check if the builtin `__atomic_thread_fence` is available?
We use all the other intrinsics above, so as long as it supports the same built-ins that GNU does it should be provided.
Also, should this function be `noexcept` or `always_inline`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145608/new/
https://reviews.llvm.org/D145608
More information about the libc-commits
mailing list