v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
once.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <atomic>
#include <functional>
#include "src/base/base-export.h"
#include "src/base/template-utils.h"
Include dependency graph for once.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  v8::base::FunctionWithArgs< Args >
 

Namespaces

namespace  v8
 
namespace  v8::base
 

Macros

#define V8_ONCE_INIT    { 0 }
 
#define V8_DECLARE_ONCE(NAME)
 

Typedefs

using v8::base::OnceType = std::atomic<uint8_t>
 
using v8::base::PointerArgFunction = void (*)(void* arg)
 

Enumerations

enum  : uint8_t { v8::base::ONCE_STATE_UNINITIALIZED = 0 , v8::base::ONCE_STATE_EXECUTING_FUNCTION = 1 , v8::base::ONCE_STATE_DONE = 2 }
 

Functions

void v8::base::CallOnceImpl (OnceType *once, std::function< void()> init_func)
 
void v8::base::CallOnce (OnceType *once, std::function< void()> init_func)
 
template<typename... Args>
requires (std::conjunction_v<std::is_scalar<Args>...>)
void v8::base::CallOnce (OnceType *once, typename FunctionWithArgs< Args... >::type init_func, Args... args)
 

Macro Definition Documentation

◆ V8_DECLARE_ONCE

#define V8_DECLARE_ONCE ( NAME)
Value:
std::atomic< uint8_t > OnceType
Definition once.h:67
#define NAME(feat,...)

Definition at line 72 of file once.h.

◆ V8_ONCE_INIT

#define V8_ONCE_INIT    { 0 }

Definition at line 69 of file once.h.