]> git.proxmox.com Git - wasi-libc.git/commit
threads: implement init of TLS and stack pointer (#342)
author韩朴宇 <w12101111@gmail.com>
Thu, 10 Nov 2022 22:12:53 +0000 (06:12 +0800)
committerGitHub <noreply@github.com>
Thu, 10 Nov 2022 22:12:53 +0000 (14:12 -0800)
commita00bf321eeeca836ee2a0d2d25aeb8524107b8cc
treec1317a28a86e37b9d56474bc4632d53fcf89f495
parentb99173e17765fdbbfa3f75e2389fc2e994a04ef2
threads: implement init of TLS and stack pointer (#342)

* threads: implement init of TLS and stack pointer

* fix: rename wasi_snapshot_preview2_thread_spawn to wasi_thread_spawn

Signed-off-by: Harald Hoyer <harald@profian.com>
* fix: change signature of wasi_thread_start

Signed-off-by: Harald Hoyer <harald@profian.com>
* fix: pthread_exit for WASI

Can't use `exit()` because it is too high level.
Have to unlock the thread list.

Signed-off-by: Harald Hoyer <harald@profian.com>
* fix: initialize struct pthread for the main thread

Signed-off-by: Harald Hoyer <harald@profian.com>
* fix: store the aligned stack minus `struct start_args`

Signed-off-by: Harald Hoyer <harald@profian.com>
Signed-off-by: Harald Hoyer <harald@profian.com>
Co-authored-by: Harald Hoyer <harald@profian.com>
Makefile
expected/wasm32-wasi/posix/defined-symbols.txt
expected/wasm32-wasi/posix/undefined-symbols.txt
libc-bottom-half/crt/crt1-command.c
libc-bottom-half/sources/__wasilibc_real.c
libc-top-half/musl/arch/wasm32/pthread_arch.h
libc-top-half/musl/src/env/__init_tls.c
libc-top-half/musl/src/internal/libc.h
libc-top-half/musl/src/internal/pthread_impl.h
libc-top-half/musl/src/thread/pthread_create.c
libc-top-half/musl/src/thread/pthread_self.c