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

#include <futex-emulation.h>

Inheritance diagram for v8::internal::FutexEmulation:
Collaboration diagram for v8::internal::FutexEmulation:

Public Types

enum  WaitMode { kSync = 0 , kAsync }
 
enum class  CallType { kIsNotWasm = 0 , kIsWasm }
 

Static Public Member Functions

static Tagged< ObjectWaitJs32 (Isolate *isolate, WaitMode mode, DirectHandle< JSArrayBuffer > array_buffer, size_t addr, int32_t value, double rel_timeout_ms)
 
static Tagged< ObjectWaitJs64 (Isolate *isolate, WaitMode mode, DirectHandle< JSArrayBuffer > array_buffer, size_t addr, int64_t value, double rel_timeout_ms)
 
static V8_EXPORT_PRIVATE Tagged< ObjectWaitWasm32 (Isolate *isolate, DirectHandle< JSArrayBuffer > array_buffer, size_t addr, int32_t value, int64_t rel_timeout_ns)
 
static V8_EXPORT_PRIVATE Tagged< ObjectWaitWasm64 (Isolate *isolate, DirectHandle< JSArrayBuffer > array_buffer, size_t addr, int64_t value, int64_t rel_timeout_ns)
 
static V8_EXPORT_PRIVATE int Wake (Tagged< JSArrayBuffer > array_buffer, size_t addr, uint32_t num_waiters_to_wake)
 
static int Wake (void *addr, uint32_t num_waiters_to_wake)
 
static void IsolateDeinit (Isolate *isolate)
 
static int NumWaitersForTesting (Tagged< JSArrayBuffer > array_buffer, size_t addr)
 
static int NumUnresolvedAsyncPromisesForTesting (Tagged< JSArrayBuffer > array_buffer, size_t addr)
 

Static Public Attributes

static const uint32_t kWakeAll = UINT32_MAX
 

Static Private Member Functions

template<typename T >
static Tagged< ObjectWait (Isolate *isolate, WaitMode mode, DirectHandle< JSArrayBuffer > array_buffer, size_t addr, T value, double rel_timeout_ms)
 
template<typename T >
static Tagged< ObjectWait (Isolate *isolate, WaitMode mode, DirectHandle< JSArrayBuffer > array_buffer, size_t addr, T value, bool use_timeout, int64_t rel_timeout_ns, CallType call_type=CallType::kIsNotWasm)
 
template<typename T >
static Tagged< ObjectWaitSync (Isolate *isolate, DirectHandle< JSArrayBuffer > array_buffer, size_t addr, T value, bool use_timeout, int64_t rel_timeout_ns, CallType call_type)
 
template<typename T >
static Tagged< ObjectWaitAsync (Isolate *isolate, DirectHandle< JSArrayBuffer > array_buffer, size_t addr, T value, bool use_timeout, int64_t rel_timeout_ns, CallType call_type)
 
static void ResolveAsyncWaiterPromises (Isolate *isolate)
 
static void ResolveAsyncWaiterPromise (FutexWaitListNode *node)
 
static void HandleAsyncWaiterTimeout (FutexWaitListNode *node)
 
static void NotifyAsyncWaiter (FutexWaitListNode *node)
 
static void CleanupAsyncWaiterPromise (FutexWaitListNode *node)
 

Friends

class FutexWaitListNode
 
class ResolveAsyncWaiterPromisesTask
 
class AsyncWaiterTimeoutTask
 

Detailed Description

Definition at line 138 of file futex-emulation.h.

Member Enumeration Documentation

◆ CallType

Enumerator
kIsNotWasm 
kIsWasm 

Definition at line 141 of file futex-emulation.h.

◆ WaitMode

Enumerator
kSync 
kAsync 

Definition at line 140 of file futex-emulation.h.

Member Function Documentation

◆ CleanupAsyncWaiterPromise()

void v8::internal::FutexEmulation::CleanupAsyncWaiterPromise ( FutexWaitListNode * node)
staticprivate

Definition at line 727 of file futex-emulation.cc.

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

◆ HandleAsyncWaiterTimeout()

void v8::internal::FutexEmulation::HandleAsyncWaiterTimeout ( FutexWaitListNode * node)
staticprivate

Definition at line 837 of file futex-emulation.cc.

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

◆ IsolateDeinit()

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

Definition at line 864 of file futex-emulation.cc.

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

◆ NotifyAsyncWaiter()

void v8::internal::FutexEmulation::NotifyAsyncWaiter ( FutexWaitListNode * node)
staticprivate

Definition at line 179 of file futex-emulation.cc.

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

◆ NumUnresolvedAsyncPromisesForTesting()

int v8::internal::FutexEmulation::NumUnresolvedAsyncPromisesForTesting ( Tagged< JSArrayBuffer > array_buffer,
size_t addr )
static

Definition at line 931 of file futex-emulation.cc.

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

◆ NumWaitersForTesting()

int v8::internal::FutexEmulation::NumWaitersForTesting ( Tagged< JSArrayBuffer > array_buffer,
size_t addr )
static

Definition at line 907 of file futex-emulation.cc.

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

◆ ResolveAsyncWaiterPromise()

void v8::internal::FutexEmulation::ResolveAsyncWaiterPromise ( FutexWaitListNode * node)
staticprivate

Definition at line 759 of file futex-emulation.cc.

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

◆ ResolveAsyncWaiterPromises()

void v8::internal::FutexEmulation::ResolveAsyncWaiterPromises ( Isolate * isolate)
staticprivate

Definition at line 801 of file futex-emulation.cc.

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

◆ Wait() [1/2]

template<typename T >
Tagged< Object > v8::internal::FutexEmulation::Wait ( Isolate * isolate,
WaitMode mode,
DirectHandle< JSArrayBuffer > array_buffer,
size_t addr,
T value,
bool use_timeout,
int64_t rel_timeout_ns,
CallType call_type = CallType::kIsNotWasm )
staticprivate

Definition at line 345 of file futex-emulation.cc.

Here is the call graph for this function:

◆ Wait() [2/2]

template<typename T >
Tagged< Object > v8::internal::FutexEmulation::Wait ( Isolate * isolate,
WaitMode mode,
DirectHandle< JSArrayBuffer > array_buffer,
size_t addr,
T value,
double rel_timeout_ms )
staticprivate

Definition at line 318 of file futex-emulation.cc.

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

◆ WaitAsync()

template<typename T >
Tagged< Object > v8::internal::FutexEmulation::WaitAsync ( Isolate * isolate,
DirectHandle< JSArrayBuffer > array_buffer,
size_t addr,
T value,
bool use_timeout,
int64_t rel_timeout_ns,
CallType call_type )
staticprivate

Definition at line 503 of file futex-emulation.cc.

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

◆ WaitJs32()

Tagged< Object > v8::internal::FutexEmulation::WaitJs32 ( Isolate * isolate,
WaitMode mode,
DirectHandle< JSArrayBuffer > array_buffer,
size_t addr,
int32_t value,
double rel_timeout_ms )
static

Definition at line 287 of file futex-emulation.cc.

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

◆ WaitJs64()

Tagged< Object > v8::internal::FutexEmulation::WaitJs64 ( Isolate * isolate,
WaitMode mode,
DirectHandle< JSArrayBuffer > array_buffer,
size_t addr,
int64_t value,
double rel_timeout_ms )
static

Definition at line 295 of file futex-emulation.cc.

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

◆ WaitSync()

template<typename T >
Tagged< Object > v8::internal::FutexEmulation::WaitSync ( Isolate * isolate,
DirectHandle< JSArrayBuffer > array_buffer,
size_t addr,
T value,
bool use_timeout,
int64_t rel_timeout_ns,
CallType call_type )
staticprivate

Definition at line 360 of file futex-emulation.cc.

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

◆ WaitWasm32()

Tagged< Object > v8::internal::FutexEmulation::WaitWasm32 ( Isolate * isolate,
DirectHandle< JSArrayBuffer > array_buffer,
size_t addr,
int32_t value,
int64_t rel_timeout_ns )
static

Definition at line 303 of file futex-emulation.cc.

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

◆ WaitWasm64()

Tagged< Object > v8::internal::FutexEmulation::WaitWasm64 ( Isolate * isolate,
DirectHandle< JSArrayBuffer > array_buffer,
size_t addr,
int64_t value,
int64_t rel_timeout_ns )
static

Definition at line 310 of file futex-emulation.cc.

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

◆ Wake() [1/2]

int v8::internal::FutexEmulation::Wake ( Tagged< JSArrayBuffer > array_buffer,
size_t addr,
uint32_t num_waiters_to_wake )
static

Definition at line 628 of file futex-emulation.cc.

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

◆ Wake() [2/2]

int v8::internal::FutexEmulation::Wake ( void * addr,
uint32_t num_waiters_to_wake )
static

Definition at line 634 of file futex-emulation.cc.

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ AsyncWaiterTimeoutTask

friend class AsyncWaiterTimeoutTask
friend

Definition at line 202 of file futex-emulation.h.

◆ FutexWaitListNode

friend class FutexWaitListNode
friend

Definition at line 200 of file futex-emulation.h.

◆ ResolveAsyncWaiterPromisesTask

friend class ResolveAsyncWaiterPromisesTask
friend

Definition at line 201 of file futex-emulation.h.

Member Data Documentation

◆ kWakeAll

const uint32_t v8::internal::FutexEmulation::kWakeAll = UINT32_MAX
static

Definition at line 144 of file futex-emulation.h.


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