aboutsummaryrefslogtreecommitdiff
path: root/lib/std/json/stringify_test.zig
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2023-06-20 22:19:51 +0200
committerLuuk de Gram <luuk@degram.dev>2023-06-26 20:00:57 +0200
commita97dbdfa0b1246913ba90cd5c05ff633e9003cb9 (patch)
tree39b0d61f4c6ee95e6d3ba39a9ce91c676398c929 /lib/std/json/stringify_test.zig
parentea0d4c8377aeabe1ef588e82cbdd9aa729adbce0 (diff)
downloadzig-a97dbdfa0b1246913ba90cd5c05ff633e9003cb9.tar.gz
zig-a97dbdfa0b1246913ba90cd5c05ff633e9003cb9.zip
std: implement `Thread` `spawn` for WASI
This implements a first version to spawn a WASI-thread. For a new thread to be created, we calculate the size required to store TLS, the new stack, and metadata. This size is then allocated using a user-provided allocator. After a new thread is spawn, the HOST will call into our bootstrap procedure. This bootstrap procedure will then initialize the TLS segment and set the newly spawned thread's TID. It will also set the stack pointer to the newly created stack to ensure we do not clobber the main thread's stack. When bootstrapping the thread is completed, we will call the user's function on this new thread.
Diffstat (limited to 'lib/std/json/stringify_test.zig')
0 files changed, 0 insertions, 0 deletions