Skip to content

Commit 3fb7caf

Browse files
authored
Remove unused argument from emscripten_notify_mailbox_postmessage. NFC (emscripten-core#22556)
This is an internal function so changing its signature should not be a user-visible change.
1 parent 7ad7f69 commit 3fb7caf

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

src/library_pthread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ var LibraryPThread = {
12421242
// new thread that has not had a chance to initialize itself and execute
12431243
// Atomics.waitAsync to prepare for the notification.
12441244
_emscripten_notify_mailbox_postmessage__deps: ['$checkMailbox'],
1245-
_emscripten_notify_mailbox_postmessage: (targetThreadId, currThreadId, mainThreadId) => {
1245+
_emscripten_notify_mailbox_postmessage: (targetThreadId, currThreadId) => {
12461246
if (targetThreadId == currThreadId) {
12471247
setTimeout(checkMailbox);
12481248
} else if (ENVIRONMENT_IS_PTHREAD) {

src/library_sigs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ sigs = {
324324
_emscripten_init_main_thread_js__sig: 'vp',
325325
_emscripten_lookup_name__sig: 'ip',
326326
_emscripten_memcpy_js__sig: 'vppp',
327-
_emscripten_notify_mailbox_postmessage__sig: 'vppp',
327+
_emscripten_notify_mailbox_postmessage__sig: 'vpp',
328328
_emscripten_push_main_loop_blocker__sig: 'vppp',
329329
_emscripten_push_uncounted_main_loop_blocker__sig: 'vppp',
330330
_emscripten_receive_on_main_thread_js__sig: 'dippip',

system/lib/pthread/thread_mailbox.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ void emscripten_thread_mailbox_send(pthread_t thread, task t) {
108108
if (thread->waiting_async) {
109109
__builtin_wasm_memory_atomic_notify((int*)thread, -1);
110110
} else {
111-
_emscripten_notify_mailbox_postmessage(
112-
thread, pthread_self(), emscripten_main_runtime_thread_id());
111+
_emscripten_notify_mailbox_postmessage(thread, pthread_self());
113112
}
114113
}
115114
}

system/lib/pthread/thread_mailbox.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ void _emscripten_thread_mailbox_await(pthread_t thread);
3434
void _emscripten_thread_mailbox_shutdown(pthread_t thread);
3535

3636
// Send a postMessage notification telling the target thread to check its
37-
// mailbox when it returns to its event loop. Pass in the current thread and
38-
// main thread ids to minimize calls back into Wasm.
37+
// mailbox when it returns to its event loop. Pass in the current thread id
38+
// minimize calls back into Wasm.
3939
void _emscripten_notify_mailbox_postmessage(pthread_t target_thread,
40-
pthread_t curr_thread,
41-
pthread_t main_thread);
40+
pthread_t curr_thread);

0 commit comments

Comments
 (0)