|
NAMEpthread_attr_getaffinity_np ,
pthread_attr_setaffinity_np —
manage CPU affinity in thread attribute objects
LIBRARYPOSIX Threads Library (libpthread, -lpthread)SYNOPSIS#include <pthread_np.h>
int
int
DESCRIPTIONThepthread_attr_getaffinity_np () and
pthread_attr_setaffinity_np () functions allow the
manipulation of sets of CPUs available to the specified thread attribute
object.
Masks of type cpuset_t are composed using
the The supplied mask should have a size of
cpusetsize bytes. This size is usually provided by
calling
RETURN VALUESIf successful, thepthread_attr_getaffinity_np () and
pthread_attr_setaffinity_np () functions will return
zero. Otherwise an error number will be returned to indicate the error.
ERRORSThepthread_attr_getaffinity_np () functions will fail
if:
The SEE ALSOcpuset(1), cpuset(2), cpuset_getid(2), cpuset_setid(2), pthread_getaffinity_np(3), pthread_np(3), pthread_setaffinity_np(3)STANDARDSThepthread_attr_getaffinity_np and
pthread_attr_setaffinity_np functions are non-standard
FreeBSD extensions and may be not available on other
operating systems.
HISTORYThepthread_attr_getaffinity_np and
pthread_attr_setaffinity_np functions first appeared
in FreeBSD 7.2.
AUTHORSThepthread_attr_getaffinity_np and
pthread_attr_setaffinity_np functions were written by
David Xu
<davidxu@FreeBSD.org>,
and this manpage was written by Xin LI
<delphij@FreeBSD.org>.
Visit the GSP FreeBSD Man Page Interface. |