Add internal tests for WASI threads (#1963)

Add internal tests for WASI threads. These tests are run in addition to
the ones in the proposal:
https://github.com/WebAssembly/wasi-threads/tree/main/test/testsuite.

The purpose is to test additional and more complex scenarios.
This commit is contained in:
Enrico Loparco
2023-03-09 02:03:16 +01:00
committed by GitHub
parent 289fc5efbf
commit 128c0ea899
36 changed files with 864 additions and 11 deletions

View File

@ -33,7 +33,7 @@ __wasi_thread_start_C(int thread_id, int *start_arg)
data->value += 8;
printf("Updated value: %d\n", data->value);
data->th_ready = 1;
__atomic_store_n(&data->th_ready, 1, __ATOMIC_SEQ_CST);
__builtin_wasm_memory_atomic_notify(&data->th_ready, 1);
}