]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cpuset(9): Refer to CPU_SETSIZE not MAXCPU
authorBrooks Davis <brooks@FreeBSD.org>
Fri, 23 Sep 2022 20:20:52 +0000 (21:20 +0100)
committerBrooks Davis <brooks@FreeBSD.org>
Mon, 26 Sep 2022 18:12:48 +0000 (19:12 +0100)
commit87767249233f6ffef5d215c163cda4d306f813fd
treed3fa2aa6c5cdf5388cb461b6a67c98b434036401
parent99b5212a2ff81e8ae61be714ea8f6a43b6087d8e
cpuset(9): Refer to CPU_SETSIZE not MAXCPU

The maximum CPU number of a cpuset_t is determined by CPU_SETSIZE. In
the kernel this is MAXCPU, but in userspace it is CPU_MAXSIZE unless
CPU_SETSIZE is defined before including sys/_cpuset.h. CPU_MAXSIZE is
256 and in userspace MAXCPU is generally 1 because it being set to a
larger MD value is gated on SMP being defined (not generally the case in
userspace).

Reported by: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Reviewed by: cem, jhb
Differential Revision: https://reviews.freebsd.org/D36679

(cherry picked from commit 8232a1eddadd6e70ce7bee085344b182517d44a7)
share/man/man9/cpuset.9