Skip to content

Commit f1293d5

Browse files
yamtloganek
authored andcommitted
Reserve some TID values
discussion: #15
1 parent e002856 commit f1293d5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ WASI host must:
147147
A WASI host that implements the above should be able to spawn threads for a
148148
variety of languages.
149149
150+
### TID (thread ID)
151+
152+
TID is a 32-bit integer provided by the host to identify threads created
153+
with `wasi_thread_spawn`.
154+
155+
* TID 0 is reserved. `wasi_thread_spawn` should not return this value.
156+
157+
* The upper-most 3-bits of TID are always 0.
158+
`wasi_thread_spawn` should not return values with these bits set.
159+
150160
#### Design choice: pthreads
151161
152162
One of the goals of this API is to be able to support `pthreads` for C compiled

0 commit comments

Comments
 (0)