{ %skiptarget=$nothread } { %version=1.1 } {$mode objfpc} uses {$ifdef unix} cthreads, {$endif} sysutils ; const {$ifdef cpuarm} {$define slowcpu} {$endif cpuarm} {$ifdef slowcpu} threadcount = 40; stringlen = 2000; {$else slowcpu} threadcount = 100; stringlen = 10000; {$endif slowcpu} var finished : longint; threadvar thri : longint; function f(p : pointer) : ptrint; var s : ansistring; begin writeln('thread ',longint(p),' started'); thri:=0; while (thri tthreadid(0) then inc(started); while finished