On 16/03/2014 10:22, Mark Morgan Lloyd wrote: > Reinier Olislagers wrote: >> 2. I intend to detect the number of logical cores as per >> http://wiki.lazarus.freepascal.org/Example_of_multi-threaded_application:_array_of_threads#1._Detect_number_of_cores_available. >> >> and run that many jobs. Is that a good idea? > > That's non-portable, even on Linux. There's a syscall which returns a > bit vector of available CPUs, you need to count those bits since the > layout might be sparse. > > qqv taskset(1), sched_setaffinity(2), sched_getaffinity(2) >
Thanks, guys - and also Mattias who I noticed has already updated the code on the wiki ;) _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
