diff options
Diffstat (limited to 'deps/v8/src/trap-handler/trap-handler.h')
-rw-r--r-- | deps/v8/src/trap-handler/trap-handler.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/deps/v8/src/trap-handler/trap-handler.h b/deps/v8/src/trap-handler/trap-handler.h index bd4ccc1f65c..c25de9c1e9c 100644 --- a/deps/v8/src/trap-handler/trap-handler.h +++ b/deps/v8/src/trap-handler/trap-handler.h @@ -77,6 +77,13 @@ inline bool IsTrapHandlerEnabled() { extern THREAD_LOCAL int g_thread_in_wasm_code; +// Return the address of the thread-local {g_thread_in_wasm_code} variable. This +// pointer can be accessed and modified as long as the thread calling this +// function exists. Only use if from the same thread do avoid race conditions. +inline int* GetThreadInWasmThreadLocalAddress() { + return &g_thread_in_wasm_code; +} + inline bool IsThreadInWasm() { return g_thread_in_wasm_code; } inline void SetThreadInWasm() { |