mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-29 02:10:09 +02:00
lazutils: wince: fixed compilation
git-svn-id: trunk@46269 -
This commit is contained in:
parent
e9b6685e64
commit
c65ace9cc9
@ -89,11 +89,14 @@ function GetSystemThreadCount: integer;
|
||||
{$IF defined(windows)}
|
||||
//returns total number of processors available to system including logical hyperthreaded processors
|
||||
var
|
||||
SystemInfo: SYSTEM_INFO;
|
||||
{$IFnDEF WinCE}
|
||||
i: Integer;
|
||||
ProcessAffinityMask, SystemAffinityMask: DWORD_PTR;
|
||||
Mask: DWORD;
|
||||
SystemInfo: SYSTEM_INFO;
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFnDEF WinCE}
|
||||
if GetProcessAffinityMask(GetCurrentProcess, ProcessAffinityMask, SystemAffinityMask)
|
||||
then begin
|
||||
Result := 0;
|
||||
@ -102,11 +105,12 @@ begin
|
||||
if (ProcessAffinityMask and Mask)<>0 then
|
||||
inc(Result);
|
||||
end;
|
||||
end else begin
|
||||
//can't get the affinity mask so we just report the total number of processors
|
||||
GetSystemInfo(SystemInfo);
|
||||
Result := SystemInfo.dwNumberOfProcessors;
|
||||
exit;
|
||||
end;
|
||||
{$ENDIF}
|
||||
//can't get the affinity mask so we just report the total number of processors
|
||||
GetSystemInfo(SystemInfo);
|
||||
Result := SystemInfo.dwNumberOfProcessors;
|
||||
end;
|
||||
{$ELSEIF defined(UNTESTEDsolaris)}
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user