1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:17:44 +00:00

LibC+Kernel: Start implementing sysconf

For now, only the non-standard _SC_NPROCESSORS_CONF and
_SC_NPROCESSORS_ONLN are implemented.

Use them to make ninja pick a better default -j value.
While here, make the ninja package script not fail if
no other port has been built yet.
This commit is contained in:
Nico Weber 2020-07-14 16:41:59 -04:00 committed by Andreas Kling
parent 782cd93c01
commit 4eb967b5eb
9 changed files with 34 additions and 14 deletions

View file

@ -1,13 +0,0 @@
diff --git a/src/util.cc b/src/util.cc
index ae94d34..72cf501 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -476,7 +476,7 @@ int GetProcessorCount() {
GetNativeSystemInfo(&info);
return info.dwNumberOfProcessors;
#else
- return sysconf(_SC_NPROCESSORS_ONLN);
+ return 1; // FIXME: serenity way of saying sysconf(_SC_NPROCESSORS_ONLN);
#endif
}