mirror of https://github.com/mkerrisk/man-pages
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:
parent
2ce777b42c
commit
ad3f4748db
|
@ -29,11 +29,13 @@
|
||||||
.\" 2005-05-03 mtk - noted that sched_setaffinity may cause thread
|
.\" 2005-05-03 mtk - noted that sched_setaffinity may cause thread
|
||||||
.\" migration and that CPU affinity is a per-thread attribute.
|
.\" migration and that CPU affinity is a per-thread attribute.
|
||||||
.\" 2006-02-03 mtk -- Major rewrite
|
.\" 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"
|
.TH SCHED_SETAFFINITY 2 2008-11-12 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
sched_setaffinity, sched_getaffinity, CPU_CLR, CPU_ISSET, CPU_SET, CPU_ZERO \
|
sched_setaffinity, sched_getaffinity \- \
|
||||||
\- set and get a process's CPU affinity mask
|
set and get a process's CPU affinity mask
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
.B #define _GNU_SOURCE
|
.B #define _GNU_SOURCE
|
||||||
|
@ -44,14 +46,6 @@ sched_setaffinity, sched_getaffinity, CPU_CLR, CPU_ISSET, CPU_SET, CPU_ZERO \
|
||||||
.sp
|
.sp
|
||||||
.BI "int sched_getaffinity(pid_t " pid ", size_t " cpusetsize ,
|
.BI "int sched_getaffinity(pid_t " pid ", size_t " cpusetsize ,
|
||||||
.BI " cpu_set_t *" mask );
|
.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
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
A process's CPU affinity mask determines the set of CPUs on which
|
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
|
.I cpu_set_t
|
||||||
structure, a "CPU set", pointed to by
|
structure, a "CPU set", pointed to by
|
||||||
.IR mask .
|
.IR mask .
|
||||||
Four macros are provided to manipulate CPU sets.
|
A set of macros for manipulating CPU sets is described in
|
||||||
.BR CPU_ZERO ()
|
.BR CPU_SET (3).
|
||||||
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.
|
|
||||||
|
|
||||||
.BR sched_setaffinity ()
|
.BR sched_setaffinity ()
|
||||||
sets the CPU affinity mask of the process whose ID is
|
sets the CPU affinity mask of the process whose ID is
|
||||||
|
@ -178,10 +154,6 @@ In glibc 2.3.3, the
|
||||||
.I cpusetsize
|
.I cpusetsize
|
||||||
argument was removed, but was then restored in glibc 2.3.4, with type
|
argument was removed, but was then restored in glibc 2.3.4, with type
|
||||||
.IR size_t .
|
.IR size_t .
|
||||||
|
|
||||||
The
|
|
||||||
.BR CPU_* ()
|
|
||||||
macros were added in glibc 2.3.3.
|
|
||||||
.SH "CONFORMING TO"
|
.SH "CONFORMING TO"
|
||||||
These system calls are Linux-specific.
|
These system calls are Linux-specific.
|
||||||
.SH "NOTES"
|
.SH "NOTES"
|
||||||
|
@ -231,6 +203,7 @@ represent the CPU set bit mask.
|
||||||
.BR sched_getscheduler (2),
|
.BR sched_getscheduler (2),
|
||||||
.BR sched_setscheduler (2),
|
.BR sched_setscheduler (2),
|
||||||
.BR setpriority (2),
|
.BR setpriority (2),
|
||||||
|
.BR CPU_SET (3),
|
||||||
.BR sched_getcpu (3),
|
.BR sched_getcpu (3),
|
||||||
.BR capabilities (7),
|
.BR capabilities (7),
|
||||||
.BR pthread_setaffinity_np (3),
|
.BR pthread_setaffinity_np (3),
|
||||||
|
|
Loading…
Reference in New Issue