[fpc-devel] Feature announcement: Extension of TThread's interface
ewald at yellowcouch.org
Thu Dec 27 18:49:57 CET 2012
Great! Keep up the good work ;-)
Rather funny actually... Quite some time ago I wrote my own threading
mechanism and decided to break compatibility with fpc's TThread
interface. Ever since I did that my own interface somehow became more
and more compatible again with the implementation of TThread in fpc....
If I wait any longer I can simply switch back to native implementation
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
only problem with the last one is that it isn't 100% correct, on an i7
for example, you get 16 as a result, where the result should be 8.
Problem is that it is quite a lot of work to get the function to work
decently, and since I didn't really was in the mood, I never fixed it
(shame on me...).
Anyway, this last one could shurely be used as some kind of all-round
implementation for CPU's that support CPUID in `IsSingleProcessor`.
If you (or anybody else) is interested, just let me know.
Once upon a time, on 12/27/2012 05:23 PM to be precise, Sven Barth said:
> Hello Free Pascal community!
> I'm pleased to announce the extension of TThread's interface to bring
> it more on par with current Delphi versions.
More information about the fpc-devel