mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 12:29:14 +02:00
+ WebAssembly threads: init StackBottom (used for stack checking) more precisely
when starting a new thread. Precision is not that important for the stack checking itself, because it uses a stack margin of 16kb, so the previous value, set by InitThread is good enough, however it's easy to do it precisely, since we allocate the stack and pass a pointer to it in TWasmThread, so why not?
This commit is contained in:
parent
da59711442
commit
9d771396ff
@ -339,6 +339,7 @@ begin
|
||||
|
||||
start_arg^.State:=tsRunning;
|
||||
InitThread(start_arg^.StackSize);
|
||||
StackBottom:=start_arg^.StackBlock;
|
||||
start_arg^.ExitCode:=Cardinal(start_arg^.ThreadFunction(start_arg^.ThreadFunctionArg));
|
||||
{$IFDEF DEBUGWASMTHREADS}DebugWriteln('FPCWasmThreadStartPascal: Signaling end of thread');{$ENDIF}
|
||||
WasiRTLEventSetEvent(start_arg^.DoneEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user