mirror of
https://github.com/openbsd/src.git
synced 2025-01-03 06:45:37 -08:00
OpenBSD
39152b4f44
In the moncontrol(3) code in libc there is a fallback function, hertz(). The idea is, if getting kern.clockrate from sysctl(2) fails, we fall back to deriving the value of hz(9) using setitimer(2)'s rounding behavior. This is extremely clever, but it actually sucks. Calling setitimer(2) quietly cancels any extant ITIMER_REAL timer, so moncontrol(3) cannot be safely used alongside setitimer(2). This fact is not documented. kern.clockrate is not blocked by pledge(2), so outside of stack corruption (which we can't do anything about anyway) I don't see a way for the sysctl(2) call to ever fail on OpenBSD. So hertz() is also pointless. Hence this patch: get rid of hertz(). Thread: https://marc.info/?l=openbsd-tech&m=163881542813633&w=2 ok guenther@ |
||
---|---|---|
bin | ||
distrib | ||
etc | ||
games | ||
gnu | ||
include | ||
lib | ||
libexec | ||
regress | ||
sbin | ||
share | ||
sys | ||
usr.bin | ||
usr.sbin | ||
.gitignore | ||
Makefile | ||
Makefile.cross |