[fpc-devel] Feature announcement: Extension of TThread's interface
microcode at zoho.com
microcode at zoho.com
Fri Dec 28 06:46:05 CET 2012
On Thu, Dec 27, 2012 at 07:01:08PM +0000, Mark Morgan Lloyd wrote:
> Ewald wrote:
>
> >Now, for the implementation of ProcessorCount I've got code here that
> >reads the amount of processor cores from `/proc/cpuinfo` (linux only I
> >think) and some assembly code [asmmode att] (tested on x86_64 and i386)
> >that *tries* to get the amount of cpu cores by the use of CPUID. The
>
> In the general case, you have to be careful with this since (a)
> every architecture puts different info in /proc/cpuinfo and (b) the
> processor numbering and affinity vectors can have gaps.
In the general case how is his x86 asm supposed to ever work on anything but
Intel or AMD boxes?
>
> type : sun4u
> ncpus probed : 12
> ncpus active : 12
> ..
> CPU0: online
> CPU1: online
> CPU4: online
> CPU5: online
> CPU8: online
> CPU9: online
> CPU10: online
> CPU11: online
> CPU12: online
> CPU13: online
> CPU14: online
> CPU15: online
Looks like a weird bug in the probing. Why does it miss CPs 2,3,6,7?
More information about the fpc-devel
mailing list