wasi-threads: basic simplistic implementation of wasi-threads proposal#1638
wasi-threads: basic simplistic implementation of wasi-threads proposal#1638loganek wants to merge 1 commit into
Conversation
59fb546 to
efb6601
Compare
@loganek Thanks for uploading the PR! I have created branch |
| int global_value = 0; | ||
|
|
||
| void | ||
| sleep(int64_t time_ns) |
There was a problem hiding this comment.
please avoid overriding unistd.h sleep(3). my suggestion is sleep_ns.
| pthread_cond_t cond; | ||
| pthread_mutex_t mp; | ||
|
|
||
| int global_value = 0; |
There was a problem hiding this comment.
answering myself, volatile isn't necessary here as surrounded by mutex calls.
| info->start_func = start_func; | ||
| info->exec_env = new_exec_env; | ||
|
|
||
| ret = pthread_create(&th, NULL, thread_start, info); |
There was a problem hiding this comment.
i guess you should use os_thread_create.
|
Closing this PR in favor of the #1783 PR (and further PRs). |
This a simpler version of the PR: #1638
…e#1783) This a simpler version of the PR: bytecodealliance#1638
…e#1783) This a simpler version of the PR: bytecodealliance#1638
This a simpler version of the PR: bytecodealliance/wasm-micro-runtime#1638
wasi-threads proposal: https://github.com/WebAssembly/wasi-threads
This is very very basic implementation, probably doesn't cover a lot of corner cases. I open the PR here to get early feedback on the direction, missing bits and suggestions.
Also, I think it'd be good to have a separate branch for that (dev/wasi-threads?) so if we can have it setup that'd be great.