#include <optional>
#include "src/base/platform/platform.h"
#include "src/base/platform/time.h"
#include "src/heap/parked-scope-inl.h"
#include "src/objects/js-atomics-synchronization-inl.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#if V8_CAN_CREATE_SHARED_HEAP_BOOL
namespace v8 {
namespace internal {
using JSAtomicsMutexTest = TestJSSharedMemoryWithNativeContext;
using JSAtomicsConditionTest = TestJSSharedMemoryWithNativeContext;
namespace {
class LockingThread : public ParkingThread { … };
class BlockingLockingThread final : public LockingThread { … };
}
TEST_F(JSAtomicsMutexTest, Contention) { … }
TEST_F(JSAtomicsMutexTest, Timeout) { … }
namespace {
class WaitOnConditionThread final : public ParkingThread { … };
}
TEST_F(JSAtomicsConditionTest, NotifyAll) { … }
}
}
#endif