sched_setaffinity.2: Refer reader to pthread_setaffinity_np(3)

pthread_setaffinity_np() is preferable for setting
thread CPU affinity if using the POSIX threads API.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2008-11-13 14:38:45 -05:00
parent ecbb9b58ce
commit d7ddac242d
1 changed files with 5 additions and 1 deletions

View File

@ -32,7 +32,7 @@
.\" 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-13 "Linux" "Linux Programmer's Manual"
.SH NAME
sched_setaffinity, sched_getaffinity \- \
set and get a process's CPU affinity mask
@ -172,6 +172,10 @@ as 0 will set the attribute for the calling thread,
and passing the value returned from a call to
.BR getpid (2)
will set the attribute for the main thread of the thread group.
(If you are using the POSIX threads API, then use
.B pthread_setaffinity_np(3)
instead of
.BR sched_setaffinity ().)
A child created via
.BR fork (2)