Skip to content

Rename _emscripten_run_on_main_thread_js. NFC #24598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/libpthread.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ var LibraryPThread = {
$proxyToMainThreadPtr: (...args) => BigInt(proxyToMainThread(...args)),
#endif

$proxyToMainThread__deps: ['$stackSave', '$stackRestore', '$stackAlloc', '_emscripten_run_on_main_thread_js'],
$proxyToMainThread__deps: ['$stackSave', '$stackRestore', '$stackAlloc', '_emscripten_run_js_on_main_thread'],
$proxyToMainThread__docs: '/** @type{function(number, (number|boolean), ...number)} */',
$proxyToMainThread: (funcIndex, emAsmAddr, sync, ...callArgs) => {
// EM_ASM proxying is done by passing a pointer to the address of the EM_ASM
Expand Down Expand Up @@ -921,7 +921,7 @@ var LibraryPThread = {
HEAPF64[b + i] = arg;
#endif
}
var rtn = __emscripten_run_on_main_thread_js(funcIndex, emAsmAddr, serializedNumCallArgs, args, sync);
var rtn = __emscripten_run_js_on_main_thread(funcIndex, emAsmAddr, serializedNumCallArgs, args, sync);
stackRestore(sp);
return rtn;
},
Expand Down
2 changes: 1 addition & 1 deletion system/lib/pthread/proxying.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ static void run_js_func(void* arg) {
}
}

double _emscripten_run_on_main_thread_js(int func_index,
double _emscripten_run_js_on_main_thread(int func_index,
void* em_asm_addr,
int num_args,
double* buffer,
Expand Down
2 changes: 1 addition & 1 deletion test/other/codesize/test_codesize_minimal_pthreads.exports
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ u (pthread_self)
v (_emscripten_proxy_main)
w (_emscripten_thread_init)
x (_emscripten_thread_crashed)
y (_emscripten_run_on_main_thread_js)
y (_emscripten_run_js_on_main_thread)
z (_emscripten_thread_free_data)
2 changes: 1 addition & 1 deletion test/other/codesize/test_codesize_minimal_pthreads.funcs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $__wasm_init_memory
$__wasm_init_tls
$_emscripten_check_mailbox
$_emscripten_proxy_main
$_emscripten_run_on_main_thread_js
$_emscripten_run_js_on_main_thread
$_emscripten_stack_alloc
$_emscripten_stack_restore
$_emscripten_thread_crashed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ u (pthread_self)
v (_emscripten_proxy_main)
w (_emscripten_thread_init)
x (_emscripten_thread_crashed)
y (_emscripten_run_on_main_thread_js)
y (_emscripten_run_js_on_main_thread)
z (_emscripten_thread_free_data)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $__wasm_init_memory
$__wasm_init_tls
$_emscripten_check_mailbox
$_emscripten_proxy_main
$_emscripten_run_on_main_thread_js
$_emscripten_run_js_on_main_thread
$_emscripten_stack_alloc
$_emscripten_stack_restore
$_emscripten_thread_crashed
Expand Down
2 changes: 1 addition & 1 deletion tools/emscripten.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ def create_pointer_conversion_wrappers(metadata):
'_wasmfs_read_file': '_ppp',
'_wasmfs_node_record_dirent': '_pp_',
'__dl_seterr': '_pp',
'_emscripten_run_on_main_thread_js': '__p_p_',
'_emscripten_run_js_on_main_thread': '__p_p_',
'_emscripten_proxy_execute_task_queue': '_p',
'_emscripten_thread_exit': '_p',
'_emscripten_thread_init': '_p_____',
Expand Down