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

2013-01-07 Thread Michael Schnell
Great ! Thanks a lot. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

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

2012-12-28 Thread Mark Morgan Lloyd
microc...@zoho.com wrote: 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]

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

2012-12-28 Thread microcode
On Fri, Dec 28, 2012 at 08:49:51AM +, Mark Morgan Lloyd wrote: microc...@zoho.com wrote: 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

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

2012-12-28 Thread patspiper
On 27/12/12 22:38, Ewald wrote: 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 @

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

2012-12-28 Thread Ewald
Once upon a time, on 12/28/2012 11:01 AM to be precise, patspiper said: On 27/12/12 22:38, Ewald wrote: 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

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

2012-12-28 Thread Ewald
Once upon a time, on 12/28/2012 06:46 AM to be precise, microc...@zoho.com said: 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`

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

2012-12-28 Thread patspiper
On 28/12/12 17:00, Ewald wrote: Once upon a time, on 12/28/2012 11:01 AM to be precise, patspiper said: On 27/12/12 22:38, Ewald wrote: Hmmm, that;s indeed quite some different output you've got there. Mine looks like this: processor : 0 vendor_id : GenuineIntel cpu

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

2012-12-28 Thread patspiper
On 28/12/12 17:41, patspiper wrote: On 28/12/12 17:00, Ewald wrote: Once upon a time, on 12/28/2012 11:01 AM to be precise, patspiper said: On 27/12/12 22:38, Ewald wrote: Hmmm, that;s indeed quite some different output you've got there. Mine looks like this: processor : 0

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

2012-12-28 Thread patspiper
On 28/12/12 17:46, patspiper wrote: On 28/12/12 17:41, patspiper wrote: On 28/12/12 17:00, Ewald wrote: Once upon a time, on 12/28/2012 11:01 AM to be precise, patspiper said: On 27/12/12 22:38, Ewald wrote: Hmmm, that;s indeed quite some different output you've got there. Mine looks like

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

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

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

2012-12-28 Thread waldo kitty
On 12/28/2012 10:46, patspiper wrote: On 28/12/12 17:41, patspiper wrote: On 28/12/12 17:00, Ewald wrote: As I said, I didn't know formats of /proc/cpuinfo differ over distributions/os'es, so it isn't safe to use this approach since all of the sudden a simly system update *might* just break

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

2012-12-28 Thread Ewald
Once upon a time, on 12/28/2012 04:41 PM to be precise, patspiper said: As I said, I didn't know formats of /proc/cpuinfo differ over distributions/os'es, so it isn't safe to use this approach since all of the sudden a simly system update *might* just break your application. True. A better

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

2012-12-28 Thread Ewald
Once upon a time, on 12/28/2012 04:46 PM to be precise, patspiper said: Try lscpu -p At first sights that would be a worthy alternative to /proc/cpuinfo indeed. Thanks for the hint. -- Ewald ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

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

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

[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

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)