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
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D36679
main
Brooks Davis 1 week ago
parent 62a7dae44d
commit 8232a1edda
  1. 6
      share/man/man9/cpuset.9

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd December 12, 2019
.Dd September 23, 2022
.Dt CPUSET 9
.Os
.Sh NAME
@ -110,9 +110,9 @@ Each CPU is represented by a single bit.
The maximum number of CPUs representable by
.Vt cpuset_t
is
.Va MAXCPU .
.Va CPU_SETSIZE .
Individual CPUs in cpusets are referenced with indices zero through
.Fa MAXCPU - 1 .
.Fa CPU_SETSIZE - 1 .
.Pp
The
.Fn CPUSET_T_INITIALIZER

Loading…
Cancel
Save