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
This commit is contained in:
parent
62a7dae44d
commit
8232a1edda
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd December 12, 2019
|
.Dd September 23, 2022
|
||||||
.Dt CPUSET 9
|
.Dt CPUSET 9
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -110,9 +110,9 @@ Each CPU is represented by a single bit.
|
|||||||
The maximum number of CPUs representable by
|
The maximum number of CPUs representable by
|
||||||
.Vt cpuset_t
|
.Vt cpuset_t
|
||||||
is
|
is
|
||||||
.Va MAXCPU .
|
.Va CPU_SETSIZE .
|
||||||
Individual CPUs in cpusets are referenced with indices zero through
|
Individual CPUs in cpusets are referenced with indices zero through
|
||||||
.Fa MAXCPU - 1 .
|
.Fa CPU_SETSIZE - 1 .
|
||||||
.Pp
|
.Pp
|
||||||
The
|
The
|
||||||
.Fn CPUSET_T_INITIALIZER
|
.Fn CPUSET_T_INITIALIZER
|
||||||
|
Loading…
Reference in New Issue
Block a user