#ifndef V8_OBJECTS_JS_ATOMICS_SYNCHRONIZATION_INL_H_
#define V8_OBJECTS_JS_ATOMICS_SYNCHRONIZATION_INL_H_
#include "src/common/assert-scope.h"
#include "src/common/globals.h"
#include "src/heap/heap-write-barrier-inl.h"
#include "src/objects/js-atomics-synchronization.h"
#include "src/objects/js-struct-inl.h"
#include "src/objects/objects-inl.h"
#include "src/objects/object-macros.h"
namespace v8 {
namespace internal {
#include "torque-generated/src/objects/js-atomics-synchronization-tq-inl.inc"
TQ_OBJECT_CONSTRUCTORS_IMPL(JSSynchronizationPrimitive)
std::atomic<JSSynchronizationPrimitive::StateT>*
JSSynchronizationPrimitive::AtomicStatePtr() { … }
void JSSynchronizationPrimitive::SetNullWaiterQueueHead() { … }
#if V8_COMPRESS_POINTERS
ExternalPointerHandle*
JSSynchronizationPrimitive::waiter_queue_head_handle_location() const { … }
#else
WaiterQueueNode** JSSynchronizationPrimitive::waiter_queue_head_location()
const {
Address location = field_address(kWaiterQueueHeadOffset);
return reinterpret_cast<WaiterQueueNode**>(location);
}
#endif
WaiterQueueNode* JSSynchronizationPrimitive::DestructivelyGetWaiterQueueHead(
Isolate* requester) { … }
JSSynchronizationPrimitive::StateT
JSSynchronizationPrimitive::SetWaiterQueueHead(Isolate* requester,
WaiterQueueNode* waiter_head,
StateT new_state) { … }
TQ_OBJECT_CONSTRUCTORS_IMPL(JSAtomicsMutex)
JSAtomicsMutex::LockGuardBase::LockGuardBase(Isolate* isolate,
Handle<JSAtomicsMutex> mutex,
bool locked)
: … { … }
JSAtomicsMutex::LockGuardBase::~LockGuardBase() { … }
JSAtomicsMutex::LockGuard::LockGuard(Isolate* isolate,
Handle<JSAtomicsMutex> mutex,
std::optional<base::TimeDelta> timeout)
: … { … }
JSAtomicsMutex::TryLockGuard::TryLockGuard(Isolate* isolate,
Handle<JSAtomicsMutex> mutex)
: … { … }
bool JSAtomicsMutex::LockImpl(Isolate* requester,
DirectHandle<JSAtomicsMutex> mutex,
std::optional<base::TimeDelta> timeout,
LockSlowPathWrapper slow_path_wrapper) { … }
bool JSAtomicsMutex::Lock(Isolate* requester, Handle<JSAtomicsMutex> mutex,
std::optional<base::TimeDelta> timeout) { … }
bool JSAtomicsMutex::TryLock() { … }
void JSAtomicsMutex::Unlock(Isolate* requester) { … }
bool JSAtomicsMutex::IsHeld() { … }
bool JSAtomicsMutex::IsCurrentThreadOwner() { … }
void JSAtomicsMutex::SetCurrentThreadAsOwner() { … }
void JSAtomicsMutex::ClearOwnerThread() { … }
std::atomic<int32_t>* JSAtomicsMutex::AtomicOwnerThreadIdPtr() { … }
TQ_OBJECT_CONSTRUCTORS_IMPL(JSAtomicsCondition)
}
}
#include "src/objects/object-macros-undef.h"
#endif