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.
Extensions:
Note: in the following list class means that the property or method is
a class property or method and thus can be called without a
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
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 our previous episode, Sven Barth said:
- ProcessorCount (class):
Returns the count of CPU cores detected by the RTL. This is based
on the new global property System.GetCPUCount which needs to be
implemented per target. Currently only a default implementation exists
which returns
Hmmm, that;s indeed quite some different output you've got there. Mine
looks like this:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU E8600 @ 3.33GHz
stepping: 10
Right, since the /proc/cpuinfo (a) is not available on many platforms
and (b) has no standard output format, I decided to fix the half done
CPUID approach. Here it goes (note: don't shoot me if my assembly is a
bit weird, I've only learned part of it by experimenting):
[see below]
For time
On Thu, 27 Dec 2012 23:06:41 +0100
Ewald ew...@yellowcouch.org wrote:
Right, since the /proc/cpuinfo (a) is not available on many platforms
and (b) has no standard output format, I decided to fix the half done
CPUID approach. Here it goes (note: don't shoot me if my assembly is a
bit weird,
On 27/12/12 22:06, Ewald wrote:
and an Intel i7, and works correctly. If someone would be so kind to
test it on some other CPU's that would be great!
It gives correct result (8 cores) on my Intel i7-3770K CPU with
HyperThreading enabled in the BIOS.
Regards,
- Graeme -
--
fpGUI Toolkit -
On Thu, Dec 27, 2012 at 07:01:08PM +, 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)
On 27/12/2012 23:06, Ewald wrote:
Oh, and the important part: The function has been tested on a Core 2 Duo
and an Intel i7, and works correctly. If someone would be so kind to
test it on some other CPU's that would be great! [I'm not 100% of the
hexadecimal of `AuthenticAMD` you see]
10 matches
Mail list logo