v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::JSSynchronizationPrimitive Class Reference

#include <js-atomics-synchronization.h>

Inheritance diagram for v8::internal::JSSynchronizationPrimitive:
Collaboration diagram for v8::internal::JSSynchronizationPrimitive:

Classes

class  BodyDescriptor
 

Public Member Functions

Tagged< ObjectNumWaitersForTesting (Isolate *requester)
 
void SetNullWaiterQueueHead ()
 

Static Public Member Functions

static void IsolateDeinit (Isolate *isolate)
 

Static Public Attributes

static constexpr int kEndOfTaggedFieldsOffset = JSObject::kHeaderSize
 

Protected Types

using StateT = uint32_t
 
using HasWaitersField = base::BitField<bool, 0, 1>
 
using IsWaiterQueueLockedField = HasWaitersField::Next<bool, 1>
 
template<class T , int size>
using NextBitField = IsWaiterQueueLockedField::Next<T, size>
 
using DequeueMatcher = std::function<bool(WaiterQueueNode*)>
 

Protected Member Functions

std::atomic< StateT > * AtomicStatePtr ()
 
WaiterQueueNodeDestructivelyGetWaiterQueueHead (Isolate *requester)
 
StateT SetWaiterQueueHead (Isolate *requester, WaiterQueueNode *waiter_head, StateT new_state)
 

Static Protected Member Functions

static void SetWaiterQueueStateOnly (std::atomic< StateT > *state, StateT new_state)
 
static bool TryLockWaiterQueueExplicit (std::atomic< StateT > *state, StateT &expected)
 

Static Protected Attributes

static constexpr StateT kEmptyState = 0
 
static constexpr StateT kWaiterQueueMask
 

Private Member Functions

WaiterQueueNode ** waiter_queue_head_location () const
 

Static Private Member Functions

static void CleanupAsyncWaiterLists (Isolate *isolate, DequeueMatcher matcher)
 

Friends

class WaiterQueueLockGuard
 

Detailed Description

Definition at line 43 of file js-atomics-synchronization.h.

Member Typedef Documentation

◆ DequeueMatcher

◆ HasWaitersField

◆ IsWaiterQueueLockedField

◆ NextBitField

Definition at line 77 of file js-atomics-synchronization.h.

◆ StateT

Definition at line 58 of file js-atomics-synchronization.h.

Member Function Documentation

◆ AtomicStatePtr()

std::atomic< JSSynchronizationPrimitive::StateT > * v8::internal::JSSynchronizationPrimitive::AtomicStatePtr ( )
inlineprotected

Definition at line 28 of file js-atomics-synchronization-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CleanupAsyncWaiterLists()

void v8::internal::JSSynchronizationPrimitive::CleanupAsyncWaiterLists ( Isolate * isolate,
DequeueMatcher matcher )
staticprivate

Definition at line 426 of file js-atomics-synchronization.cc.

Here is the caller graph for this function:

◆ DestructivelyGetWaiterQueueHead()

WaiterQueueNode * v8::internal::JSSynchronizationPrimitive::DestructivelyGetWaiterQueueHead ( Isolate * requester)
inlineprotected

Definition at line 57 of file js-atomics-synchronization-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsolateDeinit()

void v8::internal::JSSynchronizationPrimitive::IsolateDeinit ( Isolate * isolate)
static

Definition at line 420 of file js-atomics-synchronization.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NumWaitersForTesting()

Tagged< Object > v8::internal::JSSynchronizationPrimitive::NumWaitersForTesting ( Isolate * requester)

Definition at line 471 of file js-atomics-synchronization.cc.

Here is the call graph for this function:

◆ SetNullWaiterQueueHead()

void v8::internal::JSSynchronizationPrimitive::SetNullWaiterQueueHead ( )
inline

Definition at line 34 of file js-atomics-synchronization-inl.h.

Here is the call graph for this function:

◆ SetWaiterQueueHead()

JSSynchronizationPrimitive::StateT v8::internal::JSSynchronizationPrimitive::SetWaiterQueueHead ( Isolate * requester,
WaiterQueueNode * waiter_head,
StateT new_state )
inlineprotected

Definition at line 80 of file js-atomics-synchronization-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetWaiterQueueStateOnly()

void v8::internal::JSSynchronizationPrimitive::SetWaiterQueueStateOnly ( std::atomic< StateT > * state,
StateT new_state )
staticprotected

Definition at line 459 of file js-atomics-synchronization.cc.

Here is the caller graph for this function:

◆ TryLockWaiterQueueExplicit()

bool v8::internal::JSSynchronizationPrimitive::TryLockWaiterQueueExplicit ( std::atomic< StateT > * state,
StateT & expected )
staticprotected

Definition at line 449 of file js-atomics-synchronization.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ waiter_queue_head_location()

WaiterQueueNode ** v8::internal::JSSynchronizationPrimitive::waiter_queue_head_location ( ) const
inlineprivate

Definition at line 50 of file js-atomics-synchronization-inl.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ WaiterQueueLockGuard

friend class WaiterQueueLockGuard
friend

Definition at line 108 of file js-atomics-synchronization.h.

Member Data Documentation

◆ kEmptyState

StateT v8::internal::JSSynchronizationPrimitive::kEmptyState = 0
staticconstexprprotected

Definition at line 103 of file js-atomics-synchronization.h.

◆ kEndOfTaggedFieldsOffset

int v8::internal::JSSynchronizationPrimitive::kEndOfTaggedFieldsOffset = JSObject::kHeaderSize
staticconstexpr

Definition at line 48 of file js-atomics-synchronization.h.

◆ kWaiterQueueMask

StateT v8::internal::JSSynchronizationPrimitive::kWaiterQueueMask
staticconstexprprotected

The documentation for this class was generated from the following files: