mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 23:09:18 +02:00
* use volatile() to prevent wrong optimizations by llvm
git-svn-id: trunk@40466 -
This commit is contained in:
parent
122d0d36d6
commit
8846041b23
@ -55,7 +55,7 @@ begin
|
|||||||
if BeginThread({$ifdef fpc}@{$endif}f,pointer(i)) <> tthreadid(0) then
|
if BeginThread({$ifdef fpc}@{$endif}f,pointer(i)) <> tthreadid(0) then
|
||||||
inc(started);
|
inc(started);
|
||||||
|
|
||||||
while finished<started do
|
while volatile(finished)<started do
|
||||||
{$ifdef wince}sleep(10){$endif};
|
{$ifdef wince}sleep(10){$endif};
|
||||||
writeln(finished);
|
writeln(finished);
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user