Einzelnen Beitrag anzeigen

grenzgaenger
(Gast)

n/a Beiträge
 
#5

Re: BeginThreadAffinity() or SetThreadAffinity

  Alt 7. Mai 2008, 17:47
Zitat von Razor:
Delphi-Quellcode:
For X := 1 to MaxCores do
Begin
Delta := TJunction;
SetThreadAffinty(X) ;// makes that the function now runs on core X //this<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,
Rdmsr($019,EAX,EDX);
If HiWord(EAX) and $8000 > 0 then
Delta := HiWord(EAX) and $7F; // Delta-value from the temperature for reading TJunction
Temperature := TJunction-Delta;
End;
you can use descantands of the class tThread (take a look to your delphi help). but don't use things like your code above. the distribution of the threads to the differend cores and cpu's is the task of your operating system.
  Mit Zitat antworten Zitat