Commit 2c2b2132 authored by John Xu's avatar John Xu Committed by V8 LUCI CQ

Add Dummy implementations of atomics for Cobalt

This is part of Cobalt's upstream effort to be more in sync with V8.
Cobalt does not trigger the atomics functions in runtime-atomics.cc so
we use dummy implementations for now.

Bug: v8:10927
Change-Id: I2da75b7f9b22b41a1ff00af1ab4b43641e9a33bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2963801
Commit-Queue: John Xu <johnx@google.com>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75317}
parent c758c713
......@@ -41,10 +41,6 @@
#if defined(V8_OS_STARBOARD)
#include "starboard/atomic.h"
#if SB_API_VERSION < 10
#error Your version of Starboard must support SbAtomic8 in order to use V8.
#endif // SB_API_VERSION < 10
#endif // V8_OS_STARBOARD
namespace v8 {
......
......@@ -24,7 +24,44 @@ namespace internal {
namespace {
#if V8_CC_GNU
#if defined(V8_OS_STARBOARD)
template <typename T>
inline T ExchangeSeqCst(T* p, T value) {
UNIMPLEMENTED();
}
template <typename T>
inline T CompareExchangeSeqCst(T* p, T oldval, T newval) {
UNIMPLEMENTED();
}
template <typename T>
inline T AddSeqCst(T* p, T value) {
UNIMPLEMENTED();
}
template <typename T>
inline T SubSeqCst(T* p, T value) {
UNIMPLEMENTED();
}
template <typename T>
inline T AndSeqCst(T* p, T value) {
UNIMPLEMENTED();
}
template <typename T>
inline T OrSeqCst(T* p, T value) {
UNIMPLEMENTED();
}
template <typename T>
inline T XorSeqCst(T* p, T value) {
UNIMPLEMENTED();
}
#elif V8_CC_GNU
// GCC/Clang helpfully warn us that using 64-bit atomics on 32-bit platforms
// can be slow. Good to know, but we don't have a choice.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment