*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> pthread_setrunon_np (3p)              
Title
Content
Arch
Section
 

Contents


pthread_setrunon_np(3P)				       pthread_setrunon_np(3P)


NAME    [Toc]    [Back]

     pthread_setrunon_np, pthread_getrunon_np -	thread CPU scheduling affinity

C SYNOPSIS    [Toc]    [Back]

     #include <pthread.h>

     int pthread_setrunon_np(int cpu);

     int pthread_getrunon_np(int *cur_cpu);

DESCRIPTION    [Toc]    [Back]

     Executing threads run on the most eligible	CPU determined by the kernel.
     This choice may be	changed	for threads with the PTHREAD_SCOPE_SYSTEM or
     PTHREAD_SCOPE_BOUND_NP attribute using the	pthread_setrunon_np()
     interface.	 This interface	requests that the calling thread execute
     exclusively on the	named cpu.  The	CPU should be chosen in	the same way
     as	for sysmp() interface with the MP_MUSTRUN command.  To further control
     execution the MP_RESTRICT and MP_ISOLATE sysmp() commands can be used as
     usual.

     To	determine the currently	requested CPU affinity the
     pthread_getrunon_np() interface can be used.  It returns the the caller's
     CPU affinity (set by a previous call to pthread_setrunon_np()) in
     cur_cpu.

DIAGNOSTICS    [Toc]    [Back]

     On	success	pthread_setrunon_np() and pthread_getrunon_np()	return zero;
     otherwise an error	number is returned.

     pthread_setrunon_np() may return:

     [EPERM]	    The	caller is not a	PTHREAD_SCOPE_SYSTEM or	a
		    PTHREAD_SCOPE_BOUND_NP thread.

     [EINVAL]	    The	cpu argument is	not valid.

     pthread_getrunon_np() may return:

     [EPERM]	    The	caller is not a	PTHREAD_SCOPE_SYSTEM or	a
		    PTHREAD_SCOPE_BOUND_NP thread.

     [EINVAL]	    The	caller has no affinity set.

SEE ALSO    [Toc]    [Back]

      
      
     pthread_attr_setscope(3P),	sysmp(2).

NOTES    [Toc]    [Back]

     The _np suffix indicates that this	is a non-portable interface and	is not
     covered by	any standard.


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
pthread_getschedparam Tru64 Obtains the current scheduling policy and scheduling parameters of a thread
pthread_rad_detach Tru64 Detach a thread from its Resource Affinity Domain (libpthread library)
pthread_rad_bind Tru64 Attaches or binds a thread to a NUMA Resource Affinity Domain (libpthread library)
pthread_rad_attach Tru64 Attaches or binds a thread to a NUMA Resource Affinity Domain (libpthread library)
pthread_setschedparam IRIX change thread scheduling
pthread_attr_setscope IRIX thread scheduling scope attributes
pthread_single_np OpenBSD switch thread scheduling mode
pthread_getschedparam OpenBSD thread scheduling parameter manipulation
pthread_attr_setinheritsched IRIX thread scheduling inheritance attributes
pthread_schedparam OpenBSD thread scheduling parameter manipulation
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service