sched_setaffinity.2: Removed discussion of CPU_* macros()

These macros are now moving to a separate page.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2008-11-12 13:26:47 -05:00
parent 2ce777b42c
commit ad3f4748db
1 changed files with 7 additions and 34 deletions

View File

@ -29,11 +29,13 @@
.\" 2005-05-03 mtk - noted that sched_setaffinity may cause thread
.\" migration and that CPU affinity is a per-thread attribute.
.\" 2006-02-03 mtk -- Major rewrite
.\" 2008-11-12, mtk, removed CPU_*() macro descriptions to a
.\" separate CPU_SET(3) page.
.\"
.TH SCHED_SETAFFINITY 2 2008-11-12 "Linux" "Linux Programmer's Manual"
.SH NAME
sched_setaffinity, sched_getaffinity, CPU_CLR, CPU_ISSET, CPU_SET, CPU_ZERO \
\- set and get a process's CPU affinity mask
sched_setaffinity, sched_getaffinity \- \
set and get a process's CPU affinity mask
.SH SYNOPSIS
.nf
.B #define _GNU_SOURCE
@ -44,14 +46,6 @@ sched_setaffinity, sched_getaffinity, CPU_CLR, CPU_ISSET, CPU_SET, CPU_ZERO \
.sp
.BI "int sched_getaffinity(pid_t " pid ", size_t " cpusetsize ,
.BI " cpu_set_t *" mask );
.sp
.BI "void CPU_CLR(int " cpu ", cpu_set_t *" set );
.br
.BI "int CPU_ISSET(int " cpu ", cpu_set_t *" set );
.br
.BI "void CPU_SET(int " cpu ", cpu_set_t *" set );
.br
.BI "void CPU_ZERO(cpu_set_t *" set );
.fi
.SH DESCRIPTION
A process's CPU affinity mask determines the set of CPUs on which
@ -72,26 +66,8 @@ A CPU affinity mask is represented by the
.I cpu_set_t
structure, a "CPU set", pointed to by
.IR mask .
Four macros are provided to manipulate CPU sets.
.BR CPU_ZERO ()
clears a set.
.BR CPU_SET ()
and
.BR CPU_CLR ()
respectively add and remove a given CPU from a set.
.BR CPU_ISSET ()
tests to see if a CPU is part of the set; this is useful after
.BR sched_getaffinity ()
returns.
The first available CPU on the system corresponds to a
.I cpu
value of 0, the next CPU corresponds to a
.I cpu
value of 1, and so on.
The constant
.B CPU_SETSIZE
(1024) specifies a value one greater than the maximum CPU
number that can be stored in a CPU set.
A set of macros for manipulating CPU sets is described in
.BR CPU_SET (3).
.BR sched_setaffinity ()
sets the CPU affinity mask of the process whose ID is
@ -178,10 +154,6 @@ In glibc 2.3.3, the
.I cpusetsize
argument was removed, but was then restored in glibc 2.3.4, with type
.IR size_t .
The
.BR CPU_* ()
macros were added in glibc 2.3.3.
.SH "CONFORMING TO"
These system calls are Linux-specific.
.SH "NOTES"
@ -231,6 +203,7 @@ represent the CPU set bit mask.
.BR sched_getscheduler (2),
.BR sched_setscheduler (2),
.BR setpriority (2),
.BR CPU_SET (3),
.BR sched_getcpu (3),
.BR capabilities (7),
.BR pthread_setaffinity_np (3),