[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
Thu Mar 9 04:37:09 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa9cb298b3940: [libc] Add intrinsic for thread fence to the atomic support (authored by jhuber6).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145608/new/
https://reviews.llvm.org/D145608
Files:
libc/src/__support/CPP/atomic.h
Index: libc/src/__support/CPP/atomic.h
===================================================================
--- libc/src/__support/CPP/atomic.h
+++ libc/src/__support/CPP/atomic.h
@@ -92,6 +92,11 @@
void set(T rhs) { val = rhs; }
};
+// Issue a thread fence with the given memory ordering.
+LIBC_INLINE void atomic_thread_fence(MemoryOrder mem_ord) {
+ __atomic_thread_fence(int(mem_ord));
+}
+
} // namespace cpp
} // namespace __llvm_libc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145608.503733.patch
Type: text/x-patch
Size: 451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230309/55b5375d/attachment.bin>
More information about the libc-commits
mailing list