Skip to content

Commit 8a62f0b

Browse files
committed
wasi-threads: implement yet another thread-spawn abi
WebAssembly/wasi-threads#26 WebAssembly/wasi-libc#387
1 parent 86eec40 commit 8a62f0b

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

lib/wasi_threads.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,15 +409,25 @@ wasi_thread_exit(struct exec_context *ctx, struct host_instance *hi,
409409

410410
const struct host_func wasi_threads_funcs[] = {
411411
/*
412-
* The thread-spawn API before and after wit definition:
413-
* https://github.com/WebAssembly/wasi-threads/pull/26
412+
* Note: We keep a few old ABIs of thread-spawn for a while to
413+
* ease experiment/migration/testing.
414+
*/
415+
416+
/*
417+
* https://github.com/WebAssembly/wasi-threads/pull/28
414418
* https://github.com/WebAssembly/wasi-libc/pull/385
415-
*
416-
* We will keep the old one for a while to ease
417-
* experiment/migration/testing.
418419
*/
419420
WASI_HOST_FUNC2("thread-spawn", wasi_thread_spawn, "(ii)"),
421+
/*
422+
* https://github.com/WebAssembly/wasi-threads/pull/26
423+
* https://github.com/WebAssembly/wasi-libc/pull/387
424+
*/
425+
WASI_HOST_FUNC2("thread-spawn", wasi_thread_spawn_old, "(i)i"),
426+
/*
427+
* The "original" version.
428+
*/
420429
WASI_HOST_FUNC2("thread_spawn", wasi_thread_spawn_old, "(i)i"),
430+
421431
/*
422432
* Note: thread_exit is not a part of the current wasi-threads.
423433
* It's implemented here just for my experiments.

0 commit comments

Comments
 (0)