mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-11 10:10:40 +01:00
* WebAssembly threads: fix threadvars with the new WASI-threads implementation
This commit is contained in:
parent
aaf536ae10
commit
801f902efe
@ -336,6 +336,8 @@ procedure WasiAllocateThreadVars; forward;
|
||||
procedure FPCWasmThreadStartPascal(tid: longint; start_arg: PWasmThread);
|
||||
begin
|
||||
{$IFDEF DEBUGWASMTHREADS}DebugWriteln('FPCWasmThreadStartPascal(...)');{$ENDIF}
|
||||
fpc_wasm32_init_tls(start_arg^.InitTLSBase);
|
||||
|
||||
start_arg^.ID:=tid;
|
||||
GlobalCurrentThread:=@start_arg;
|
||||
GlobalIsMainThread:=0;
|
||||
@ -359,12 +361,6 @@ asm
|
||||
i32.load
|
||||
global.set $__stack_pointer
|
||||
|
||||
local.get 1
|
||||
i32.const 4
|
||||
i32.add
|
||||
i32.load
|
||||
global.set $__tls_base
|
||||
|
||||
local.get 0
|
||||
local.get 1
|
||||
call $FPCWasmThreadStartPascal
|
||||
|
||||
Loading…
Reference in New Issue
Block a user