HomeFreeBSD

sched.h: Hide all Linux compat sched_* functions under _WITH_CPU_SET_T

Description

sched.h: Hide all Linux compat sched_* functions under _WITH_CPU_SET_T

Instead of only hiding cpu_set_t compat typedef itself.

Too many software packages assume that sched_getaffinity() presence
implies full source compatibility with glibc. We can (and should)
handle missing CPU_* macros, but then there are incompatible BIT_* uses
which cannot be fixed in src/.

So hide everything under _WITH_CPU_SET_T, in particular, do not expose
sched_getcpu(), sched_get/setaffinity(), as well as CPU_* and BIT_*
macros. Consumers that want sched* functions must opt-in.

Reported by: portmgr (antoine)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Provenance
kibAuthored on Nov 11 2021, 8:01 AM
Parents
rGef396441ceb8: tcp_usr_detach: revert debugging piece from f5cf1e5f5a500.
Branches
Unknown
Tags
Unknown