1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 01:51:03 +09:00

LibCore: Implement System::hardware_concurrency on Windows

This commit is contained in:
stasoid 2024-12-18 08:53:45 +05:00 committed by Andrew Kaster
parent 0fd0596dbf
commit f143a9b971
Notes: github-actions[bot] 2025-02-11 11:08:34 +00:00

View file

@ -231,4 +231,12 @@ ErrorOr<void> sleep_ms(u32 milliseconds)
return {};
}
unsigned hardware_concurrency()
{
SYSTEM_INFO si = {};
GetSystemInfo(&si);
// number of logical processors in the current group (max 64)
return si.dwNumberOfProcessors;
}
}