[fpc-devel] Feature announcement: Extension of TThread's interface

Ewald ewald at yellowcouch.org
Fri Dec 28 20:13:40 CET 2012


Once upon a time, on 12/28/2012 05:59 PM to be precise, Marco van de
Voort said:
> In our previous episode, Ewald said:
>>> cores' (no hyperthreading), and 0.5 if 'siblings' = 2 x 'cpu cores'
>>> (hyperthreading enabled).
>> Yeah, that could work, but then again the actual format of the data may
>> be different measured over several distributions: suppose all `:` all of
>> the sudden become `=`? Suppose that an identifier like `processor`
>> undergoes a slicht namechange to `processorid`?
> True. /proc is indeed not very desirable in general, and might vary per
> architecture too.
Agreed.
>
> OTOH, even if CPUID works, and it is maintainable, it only is for one
> architecture, and in general in these cases the problem is getting it to
> work for the least popular targets/architectures, the most popular ones are
> usually easily implemented after a few googles, and also keeping them up to
> date is less of a problem.
Yep, that's true, a few quick searches gives you something to get
started. Then again I thought an cpu-specific implementation could also
be quite handy since
- There are no external depencies
- It is OS independant

Now, since apparantly the CPUID function returns ambiguous results from
time to time it obviously cannot be used in a usefull manner.

-- 
Ewald




More information about the fpc-devel mailing list