hrev53302 adds 1 changeset to branch 'master'
old head: 68d11f88e9109138e7499b030a0cc151444bd7e4
new head: bbee879291c68d959145c57406a95eee8d1d8dd7
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=bbee879291c6+%5E68d11f88e910
----------------------------------------------------------------------------
bbee879291c6: kernel/system_info: Restore the previous cpuCount check.
As per axeld's review; the change was unnecessary.
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev53302
Commit: bbee879291c68d959145c57406a95eee8d1d8dd7
URL: https://git.haiku-os.org/haiku/commit/?id=bbee879291c6
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Sat Jul 27 21:09:43 2019 UTC
----------------------------------------------------------------------------
1 file changed, 2 insertions(+), 2 deletions(-)
src/system/kernel/system_info.cpp | 4 ++--
----------------------------------------------------------------------------
diff --git a/src/system/kernel/system_info.cpp
b/src/system/kernel/system_info.cpp
index 71e27ec273..554a88a861 100644
--- a/src/system/kernel/system_info.cpp
+++ b/src/system/kernel/system_info.cpp
@@ -493,12 +493,12 @@ get_system_info(system_info* info)
status_t
get_cpu_info(uint32 firstCPU, uint32 cpuCount, cpu_info* info)
{
+ if (cpuCount == 0)
+ return B_OK;
if (firstCPU >= (uint32)smp_get_num_cpus())
return B_BAD_VALUE;
uint32 count = std::min(cpuCount, smp_get_num_cpus() - firstCPU);
- if (count <= 0)
- return B_OK;
// This function is called very often from userland by applications
// that display CPU usage information, so we want to keep this as