[fpc-pascal] SOLVED : Re: GetAffinity\SetAffinity
Brian
vmst at golden.net
Mon Nov 25 15:31:08 CET 2013
Problem solved ... ironically the solution was from a Windows guy.
Faulty Code
Core2Thread_ID := BeginThread(@Core2_Thread_Test);
InitCriticalSection(CriticalSection_Core2);
Set_Thread_CPU_Core(Core2Thread_ID,$01);
writeln('Core2 ok');
Core22Thread_ID := BeginThread(@Core22_Thread_Test);
InitCriticalSection(CriticalSection_Core22);
Set_Thread_CPU_Core(Core22Thread_ID,$02);
=====================================================
Corrected Code : InitCriticalSection() BEFORE BeginThread()
InitCriticalSection(CriticalSection_Core2);
Core2Thread_ID := BeginThread(@Core2_Thread_Test);
Set_Thread_CPU_Core(Core2Thread_ID,$01);
writeln('Core2 ok');
InitCriticalSection(CriticalSection_Core22);
Core22Thread_ID := BeginThread(@Core22_Thread_Test);
Set_Thread_CPU_Core(Core22Thread_ID,$02);
--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/GetAffinity-SetAffinity-tp3351231p5717575.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal
mailing list