mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
LibCore: Implement System::hardware_concurrency on Windows
This commit is contained in:
parent
0fd0596dbf
commit
f143a9b971
Notes:
github-actions[bot]
2025-02-11 11:08:34 +00:00
Author: https://github.com/stasoid
Commit: f143a9b971
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2959
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/R-Goc
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue