aboutsummaryrefslogtreecommitdiffstats
path: root/man2/sched_setaffinity.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/sched_setaffinity.2')
-rw-r--r--man2/sched_setaffinity.217
1 files changed, 14 insertions, 3 deletions
diff --git a/man2/sched_setaffinity.2 b/man2/sched_setaffinity.2
index d3f3de128d..51fd243351 100644
--- a/man2/sched_setaffinity.2
+++ b/man2/sched_setaffinity.2
@@ -36,10 +36,18 @@ affinity mask
.B #include <sched.h>
.sp
.BI "int sched_setaffinity(pid_t " pid ", unsigned int " len ,
-.BI "unsigned long *" mask );
+.BI "cpu_set_t *" mask );
.sp
.BI "int sched_getaffinity(pid_t " pid ", unsigned int " len ,
-.BI "unsigned long *" mask );
+.BI "cpu_set_t *" mask );
+.sp
+.BI "CPU_CLR(int " cpu ", cpu_set_t *" set );
+.br
+.BI "CPU_ISSET(int " cpu ", cpu_set_t *" set );
+.br
+.BI "CPU_SET(int " cpu ", cpu_set_t *" set );
+.br
+.BI "CPU_ZERO(cpu_set_t *" set );
.SH DESCRIPTION
.BR sched_setaffinity ()
sets the CPU affinity mask of the process denoted by
@@ -48,8 +56,11 @@ If
.I pid
is zero, then the current process is used.
.sp
-The affinity mask is represented by the bitmask stored in
+The affinity mask is represented by the
+.I cpu_set_t
+value pointed to by
.IR mask .
+
The least significant bit corresponds to the first logical processor
number on the system, while the most significant bit corresponds to
the last logical processor number on the system.