Path: blob/main/system/lib/pthread/emscripten_thread_state.S
6171 views
#ifdef __wasm64__1#define PTR i642#else3#define PTR i324#endif56.section .globals,"",@78.globaltype thread_ptr, PTR9thread_ptr:1011.globaltype is_main_thread, i3212is_main_thread:1314.globaltype is_runtime_thread, i3215is_runtime_thread:1617.globaltype supports_wait, i3218supports_wait:1920.section .text,"",@2122.globl __get_tp23__get_tp:24.functype __get_tp () -> (PTR)25global.get thread_ptr26end_function2728.globl __set_thread_state29__set_thread_state:30.functype __set_thread_state (PTR, i32, i32, i32) -> ()31local.get 032global.set thread_ptr33local.get 134global.set is_main_thread35local.get 236global.set is_runtime_thread37local.get 338global.set supports_wait39end_function4041# Semantically the same as testing "!ENVIRONMENT_IS_PTHREAD" in JS42.globl emscripten_is_main_runtime_thread43emscripten_is_main_runtime_thread:44.functype emscripten_is_main_runtime_thread () -> (i32)45global.get is_runtime_thread46end_function4748# Semantically the same as testing "!ENVIRONMENT_IS_WORKER" in JS49.globl emscripten_is_main_browser_thread50emscripten_is_main_browser_thread:51.functype emscripten_is_main_browser_thread () -> (i32)52global.get is_main_thread53end_function5455# Semantically the same as testing "!ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_AUDIO_WORKLET" in JS56.globl _emscripten_thread_supports_atomics_wait57_emscripten_thread_supports_atomics_wait:58.functype _emscripten_thread_supports_atomics_wait () -> (i32)59global.get supports_wait60end_function616263