 man-pages-1.53.Announce       |    1 
 man2/sched_get_priority_max.2 |    2 
 man2/sched_getaffinity.2      |    1 
 man2/sched_setaffinity.2      |  124 ++++++++++++++++++++++++++++++++++++++++++
 man2/sched_setparam.2         |    2 
 man2/sched_setscheduler.2     |    2 
 6 files changed, 132 insertions(+)

diff -urN man-pages-1.53/man2/sched_getaffinity.2 man-pages/man2/sched_getaffinity.2
--- man-pages-1.53/man2/sched_getaffinity.2	1969-12-31 19:00:00.000000000 -0500
+++ man-pages/man2/sched_getaffinity.2	2002-11-19 19:24:34.000000000 -0500
@@ -0,0 +1 @@
+.so man2/sched_setaffinity.2
diff -urN man-pages-1.53/man2/sched_get_priority_max.2 man-pages/man2/sched_get_priority_max.2
--- man-pages-1.53/man2/sched_get_priority_max.2	2001-06-10 19:17:24.000000000 -0400
+++ man-pages/man2/sched_get_priority_max.2	2002-11-19 19:49:18.000000000 -0500
@@ -92,6 +92,8 @@
 .SH "CONFORMING TO"
 POSIX.1b (formerly POSIX.4)
 .SH "SEE ALSO"
+.BR sched_setaffinity (2),
+.BR sched_getaffinity (2),
 .BR sched_setscheduler (2),
 .BR sched_getscheduler (2),
 .BR sched_setparam (2),
diff -urN man-pages-1.53/man2/sched_setaffinity.2 man-pages/man2/sched_setaffinity.2
--- man-pages-1.53/man2/sched_setaffinity.2	1969-12-31 19:00:00.000000000 -0500
+++ man-pages/man2/sched_setaffinity.2	2002-11-19 19:52:05.000000000 -0500
@@ -0,0 +1,124 @@
+.\" man2/sched_setaffinity.2 - sched_setaffinity and sched_getaffinity man page
+.\"
+.\" Copyright (C) 2002 Robert Love
+.\"
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, write to the Free
+.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
+.\" USA.
+.\"
+.\" 19 Nov 2002	Robert Love <rml@tech9.net>
+.\" 		initial version
+.\"
+.TH SCHED_SETAFFINITY 2 2002-11-19 "Linux" "Linux Programmer's Manual"
+.SH NAME
+sched_setaffinity, sched_getaffinity \- set and get a process's CPU affinity
+mask
+.SH SYNOPSIS
+.B #include <sched.h>
+.sp
+\fBint sched_setaffinity(pid_t \fIpid\fB, unsigned int \fIlen\fB, unsigned long *\fImask\fB);
+.sp
+\fBint sched_getaffinity(pid_t \fIpid\fB, unsigned int \fIlen\fB, unsigned long *\fImask\fB);
+
+.SH DESCRIPTION
+.B sched_setaffinity
+sets the CPU affinity mask of the process denoted by
+.IR pid .
+If
+.I pid
+is zero, then the current process is used.
+.sp
+The affinity mask is represented by the bitmask stored in
+.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.  A set bit corresponds to a legally schedulable
+CPU while an unset bit corresponds to an illegally schedulable CPU.  In other
+words, a process is bound to and will only run on processors whose
+corresponding bit is set.  Usually, all bits in the mask are set.
+.sp
+The argument
+.I len
+is the length of the data pointed to by
+.IR mask .
+Normally this is the size of a word on the system.  For compatibility with
+future versions of the Linux kernel, since this size can change, the bitmask
+supplied must be at least as large as the affinity mask stored in the kernel.
+.sp
+The function
+.B sched_getaffinity
+writes into the pointer supplied by
+.I mask
+that is size
+.I len
+the affinity mask of process
+.IR pid .
+If
+.I pid
+is zero, then the mask of the current process is returned.
+
+.SH "RETURN VALUE"
+On success,
+.BR sched_setaffinity
+and
+.BR sched_getaffinity
+both return 0.
+On error, \-1 is returned, and
+.I errno
+is set appropriately.
+
+.SH ERRORS
+.TP
+.B EFAULT
+A supplied memory address was invalid.
+.TP
+.B ESRCH
+The process whose ID is \fIpid\fR could not be found.
+.TP
+.B EPERM
+The calling process does not have appropriate privileges. The process
+calling
+.BR sched_setaffinity
+needs an effective uid equal to the euid or uid of the process
+identified by
+.IR pid ,
+or it posses the
+.IR CAP_SYS_NICE
+capability.
+.TP
+.B EINVAL
+The affinity bitmask 
+.I mask
+contains no processors that are physically on the system or the length
+.I len
+is smaller than the size of the affinity mask used by the kernel.
+.SH "HISTORY"
+The affinity syscalls were introduced in Linux kernel 2.5.8.
+
+.SH "SEE ALSO"
+.BR sched_setscheduler (2),
+.BR sched_getscheduler (2),
+.BR sched_get_priority_max (2),
+.BR sched_get_priority_min (2),
+.BR nice (2),
+.BR setpriority (2),
+.BR getpriority (2),
+.PP
+.BR sched_setscheduler (2)
+has a description of the Linux scheduling scheme.
diff -urN man-pages-1.53/man2/sched_setparam.2 man-pages/man2/sched_setparam.2
--- man-pages-1.53/man2/sched_setparam.2	2001-06-10 19:17:24.000000000 -0400
+++ man-pages/man2/sched_setparam.2	2002-11-19 19:49:39.000000000 -0500
@@ -106,6 +106,8 @@
 .SH "CONFORMING TO"
 POSIX.1b (formerly POSIX.4)
 .SH "SEE ALSO"
+.BR sched_setaffinity (2),
+.BR sched_getaffinity (2),
 .BR sched_setscheduler (2),
 .BR sched_getscheduler (2),
 .BR sched_get_priority_max (2),
diff -urN man-pages-1.53/man2/sched_setscheduler.2 man-pages/man2/sched_setscheduler.2
--- man-pages-1.53/man2/sched_setscheduler.2	2002-08-05 04:17:27.000000000 -0400
+++ man-pages/man2/sched_setscheduler.2	2002-11-19 19:48:35.000000000 -0500
@@ -258,6 +258,8 @@
 (http://www.rtlinux.org) or use a different operating system
 designed specifically for hard real-time applications.
 .SH "SEE ALSO"
+.BR sched_setaffinity (2),
+.BR sched_getaffinity (2),
 .BR sched_setparam (2),
 .BR sched_getparam (2),
 .BR sched_yield (2),
diff -urN man-pages-1.53/man-pages-1.53.Announce man-pages/man-pages-1.53.Announce
--- man-pages-1.53/man-pages-1.53.Announce	2002-08-25 19:26:21.000000000 -0400
+++ man-pages/man-pages-1.53.Announce	2002-11-19 19:23:55.000000000 -0500
@@ -120,6 +120,7 @@
     Reed H. Petty <rhp@draper.net>
     Rik Faith <faith@cs.unc.edu>
     Robert K. Nichols <Robert.K.Nichols@att.com>
+    Robert Love <rml@tech9.net>
     Sam Varshavchik <mrsam@courier-mta.com>
     Stephen Lee <sl14@cornell.edu>
     Steven Greenland <stevegr@sugar.neosoft.com>
