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

2012-12-27 Thread Sven Barth
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

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

2012-12-27 Thread Ewald
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

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

2012-12-27 Thread Mark Morgan Lloyd
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

BSD cpucount was Re: [fpc-devel] Feature announcement: Extension of TThread's interface

2012-12-27 Thread Marco van de Voort
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

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

2012-12-27 Thread Ewald
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

[fpc-devel] AMD Intel CPUCount (was: Feature announcement: Extension of TThread's interface)

2012-12-27 Thread Ewald
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

Re: [fpc-devel] AMD Intel CPUCount (was: Feature announcement: Extension of TThread's interface)

2012-12-27 Thread Mattias Gaertner
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,

Re: [fpc-devel] AMD Intel CPUCount

2012-12-27 Thread Graeme Geldenhuys
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 -

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

2012-12-27 Thread microcode
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)

Re: [fpc-devel] AMD Intel CPUCount

2012-12-27 Thread Ludo Brands
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]