On 12.09.2014 20:20, Sven Barth wrote:
Am 12.09.2014 17:31 schrieb "Marco van de Voort" <mar...@stack.nl
<mailto:mar...@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 ;)

I've now implemented GetCPUCount for all Windows targets. For the BSD's I'd use sysctl, which would mean that I'd need to duplicate sysctl() and the necessary constants/types...

Regards,
Sven

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to