Skip to content

Commit

Permalink
Reserve some TID values
Browse files Browse the repository at this point in the history
discussion:
#15
  • Loading branch information
yamt committed Dec 14, 2022
1 parent 3005bf1 commit 4037b0e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ WASI host must:
A WASI host that implements the above should be able to spawn threads for a
variety of languages.
### TID (thread ID)
TID is a 32-bit integer provided by the host to identify threads created
with `wasi_thread_spawn`. It's managed and provided by the host.
* TID 0 is reserved. `wasi_thread_spawn` should not return this value.
* The upper-most 3-bits of TID are always 0.
`wasi_thread_spawn` should not return values with these bits set.
#### Design choice: pthreads
One of the goals of this API is to be able to support `pthreads` for C compiled
Expand Down

0 comments on commit 4037b0e

Please sign in to comment.