Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Use sysconf(_SC_NPROCESSORS_CONF) in PAL_GetLogicalCpuCountFromOS #18053

Merged
merged 2 commits into from
May 24, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pal/src/misc/sysinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ PAL_GetLogicalCpuCountFromOS()
int nrcpus = 0;

#if HAVE_SYSCONF
nrcpus = sysconf(_SC_NPROCESSORS_ONLN);
nrcpus = sysconf(_SC_NPROCESSORS_CONF);
if (nrcpus < 1)
{
ASSERT("sysconf failed for _SC_NPROCESSORS_ONLN (%d)\n", errno);
ASSERT("sysconf failed for _SC_NPROCESSORS_CONF (%d)\n", errno);
}
#elif HAVE_SYSCTL
int rc;
Expand Down