[fpc-pascal] Re: GetAffinity\SetAffinity

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Fri Nov 22 10:15:45 CET 2013


Brian wrote:
> Attached is a simple test program with two threads. When the threads run ,
> one displays '+' and the other displays '2'.
> 
> If both threads run on the same core , the threads work , but if the threads
> are set to different cores , it generates a GP fault.
> 
> If anyone is interested , download the code . It was tested on Ubuntu
> 12.04lts , but should be portable .
> 
> Would be interested hear any results to confirm it is not a hardware issue
> on this PC.
> 
> coret.pas
> <http://free-pascal-general.1045716.n5.nabble.com/file/n5717544/coret.pas>  
> test_threads.pas
> <http://free-pascal-general.1045716.n5.nabble.com/file/n5717544/test_threads.pas>  

The only x86 systems conveniently to hand are multi-CPU rather than 
multi-core, but I'll happily test that provided you can make it into a 
standalone program. As it stands coret.pas requires non-standard units, 
and test_threads.pas isn't standalone.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list