|
NAMEpthread_getaffinity_np ,
pthread_setaffinity_np —
manage CPU affinity
LIBRARYPOSIX Threads Library (libpthread, -lpthread)SYNOPSIS#include <pthread_np.h>
int
int
DESCRIPTIONpthread_getaffinity_np () and
pthread_setaffinity_np () allow the manipulation of
sets of CPUs available to the specified thread.
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_getaffinity_np () and
pthread_setaffinity_np () functions will return zero.
Otherwise an error number will be returned to indicate the error.
ERRORSThepthread_getaffinity_np () and
pthread_setaffinity_np () functions may fail if:
SEE ALSOcpuset(1), cpuset(2), cpuset_getid(2), cpuset_setid(2), pthread(3), pthread_attr_getaffinity_np(3), pthread_attr_setaffinity_np(3), pthread_np(3)STANDARDSThepthread_getaffinity_np and
pthread_setaffinity_np functions are non-standard
FreeBSD extensions and may be not available on other
operating systems.
HISTORYThepthread_getaffinity_np and
pthread_setaffinity_np function first appeared in
FreeBSD 7.2.
AUTHORSThepthread_getaffinity_np and
pthread_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. |