Age | Commit message (Collapse) | Author |
|
With this sysconf(3) no longer needs the inet pledge.
The kernel has been updated for this for a while now.
OK sthen@ deraadt@
|
|
|
|
The introduction of hw.smt means that logical CPUs can be disabled
after boot and prior to suspend/resume. If hw.smt=0 (the default),
there needs to be a way to count the number of hardware threads
available on the system at any given time.
So, import HW_NCPUONLINE/hw.ncpuonline from NetBSD and document it.
hw.ncpu becomes equal to the number of CPUs given to sched_init_cpu()
during boot, while hw.ncpuonline is equal to the number of CPUs available
to the scheduler in the cpuset "sched_all_cpus". Set_SC_NPROCESSORS_ONLN
equal to this new sysctl and keep _SC_NPROCESSORS_CONF equal to hw.ncpu.
This is preferable to adding a new sysctl to count the number of
configured CPUs and keeping hw.ncpu equal to the number of online
CPUs because such a change would break software in the ecosystem
that relies on HW_NCPU/hw.ncpu to measure CPU usage and the like.
Such software in base includes top(1), systat(1), and snmpd(8),
and perhaps others.
We don't need additional locking to count the cardinality of a cpuset
in this case because the only interfaces that can modify said cardinality
are sysctl(2) and ioctl(2), both of which are under the KERNEL_LOCK.
Software using HW_NCPU/hw.ncpu to determine optimal parallism will need
to be updated to use HW_NCPUONLINE/hw.ncpuonline. Until then, such software
may perform suboptimally. However, most changes will be similar to the
change included here for libcxx's std::thread:hardware_concurrency():
using HW_NCPUONLINE in lieu of HW_NCPU should be sufficient for determining
optimal parallelism for most software if the change to _SC_NPROCESSORS_ONLN
is insufficient.
Prompted by deraadt. Discussed at length with kettenis, deraadt, and sthen.
Lots of patch tweaks from kettenis.
ok kettenis, "proceed" deraadt
|
|
cancellation points in POSIX, so change them to invoke the non-cancellation
point versions of open(), close(), nanosleep(), and write()
ok deraadt@ millert@
|
|
move their definitions and initialization in static links to libc.a
Make crt0 always invoke a new func _csu_finish() in libc to process the auxv
and to either register the ld.so cleanup function (in dynamic links) or
initialize environ and __progname and do MC_DISABLE_KBIND (in static links).
In libc, get pagesize from auxv; cache that between getpagesize() and
sysconf(_SC_PAGESIZE)
ok mpi@ "good time" deraadt@
|
|
Delete unused 'fd' argument from internal function oldttyname()
|
|
|
|
review by millert, binary checking process with doug, concept with guenther
|
|
don't need to be married.
ok guenther miod beck jsing kettenis
|
|
include <sys/vmmeter.h> where it is needed instead of relying on
it being included by <uvm/uvm_extern.h>.
miod@ likes it, ok guenther@
|
|
unrelated sysv sem limit. Similarly, sysconf(_SC_SEM_NSEMS_MAX)
should return -1 instead of another sysv sem limit.
|
|
handle rlim_cur set to RLIM_INFINITY or values greater than LONG_MAX,
as unlikely as those are to happen. Further limit _SC_STREAM_MAX to
at most SHRT_MAX, because struct __sFILE uses a short int for storing
the file descriptor.
While here, also remove a dead label that Clang complains about.
From FreeBSD via Brad.
|
|
values or features that POSIX now requires to always be provided.
From Brad; ok guenther and me; incorporates feedback from millert too
|
|
ok guenther, millert (and me); bulk build test by naddy
|
|
_SC_MONOTONIC_CLOCK variable.
from Brad
No libc minor crank needed, as no API has been changed, per se (deraadt).
ports bulk testing by landry@
small man rewording from thib@
ok millert@ otto@ deraadt@
|
|
reentrant getgrent functions (getgrgid_r, getgrnam_r).
seems reasonable to millert@, ok deraadt@
|
|
a libc crank is happening in < 24 hours
|
|
_SC_NPROCESSORS_ONLN, implemented by AIX/Tru64/Solaris/Linux/SCO/FreeBSD/NetBSD.
Bump libc minor.
From Brad, ok deraadt@ guenther@
|
|
and _SC_THREAD_SAFE_FUNCTIONS for sysconf(3). OK deraadt@
|
|
ok espie@
|
|
Kill old files that are no longer compiled.
okay theo
|
|
ok millert@
|
|
Based on a diff from Jean-Gérard Pailloncy.
|
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
mostly from kleink
|
|
Remove unused variables
Silence some warnings
lint(1) is your friend
|
|
Make sure everything uses {SYS,}LIBC_SCCS properly
|
|
|