[Bug 230330] _SC_NPROCESSORS_ONLN reports offline CPUs

[email protected]
Newsgroups gmane.os.freebsd.devel.standards
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230330

--- Comment #9 from Mark Millard <[email protected]> ---
(In reply to Mark Millard from comment #7)

Looking at the code that resulted is probably easier than
interpreting the bugzilla wording:

https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=97a912f7a832a662960749948049e15f3aecb2a7;hp=f787e138aa0bf677bf74fa2a08595c446292f3d7
shows:

__get_nprocs now first tries:

int result = read_sysfs_file ("/sys/devices/system/cpu/online");

__get_nprocs_conf now first tries:

int result = read_sysfs_file ("/sys/devices/system/cpu/possible");

It was __get_nprocs_conf that had the semantic change back to the
old way. __get_nprocs had stayed with /sys/devices/system/cpu/online
use in the first place.

For reference:

   case _SC_NPROCESSORS_CONF:
     return __get_nprocs_conf ();

   case _SC_NPROCESSORS_ONLN:
     return __get_nprocs ();

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.