Einzelnen Beitrag anzeigen

Razor
(Gast)

n/a Beiträge
 
#4

Re: BeginThreadAffinity() or SetThreadAffinity

  Alt 7. Mai 2008, 18:44
Yea but how to make threads ,becouse of this code
I figured myself..and intel manuals..

Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject);
VAR
EAX,EDX:DWORD;
Temperature ,delta,maxcores,x,TJunction:integer;

begin
InitializeDll();
cxCpu401.Available.Available:=maxcores;









Rdmsr($00EE,EAX,EDX);
IF EAX and $40000000 = 0 then TJunction := 100 Else TJunction := 85;
form1.Caption:=inttostr(TJunction);


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;
  Mit Zitat antworten Zitat