[fpc-pascal] detect CPU cores

Sven Barth pascaldragon at googlemail.com
Fri Sep 12 20:20:46 CEST 2014


Am 12.09.2014 17:31 schrieb "Marco van de Voort" <marcov at stack.nl>:
>
> In our previous episode, Sven Barth said:
> > FPC 2.7.1 has TThread.ProcessorCount (it's a class property, so no
instance
> > needed) or System.CpuCount (ProcessorCount uses this). It's not yet
> > implemented though for any system :/
>
> I ran it to test if it made a difference between cores and hyperthreading,
> but didn't even get that far, on Windows it seems to always return 1.

Considering that the implementation is currently "Result := 1" for any
target that is no surprise ;)

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140912/a2ad369d/attachment.html>


More information about the fpc-pascal mailing list