Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_getschedparam(3) [osf1 man page]

pthread_getschedparam(3)				     Library Functions Manual					  pthread_getschedparam(3)

NAME
pthread_getschedparam - Obtains the current scheduling policy and scheduling parameters of a thread. LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so) SYNOPSIS
#include <pthread.h> int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: IEEE Std 1003.1c-1995, POSIX System Application Program Interface PARAMETERS
Thread whose scheduling policy and parameters are obtained. Receives the value of the scheduling policy for the thread specified in thread. Refer to the description of the pthread_setschedparam(3) routine for valid parameters and their meanings. Receives the value of the scheduling parameters for the thread specified in thread. Refer to the description of the pthread_setschedparam(3) routine for valid values. DESCRIPTION
This routine obtains both the current scheduling policy and associated scheduling parameters of the thread specified by the thread argu- ment. The priority value returned in the param structure is the value specified in the attr argument passed to pthread_create(3) or by the most recent call to pthread_setschedparam(3) that affects the target thread. This routine differs from pthread_attr_getschedpolicy(3) and pthread_attr_getschedparam(3), in that those routines get the scheduling pol- icy and parameter attributes that are used to establish the priority and scheduling policy of a new thread when it is created. This rou- tine, however, obtains the scheduling policy and parameters of an existing thread. RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Successful completion. The value specified by thread does not refer to an existing thread. ERRORS
None RELATED INFORMATION
Functions: pthread_attr_getschedparam(3), pthread_attr_getschedpolicy(3), pthread_create(3), pthread_self(3), pthread_setschedparam(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_getschedparam(3)

Check Out this Related Man Page

PTHREAD_SETSCHEDPARAM(3)				     Library Functions Manual					  PTHREAD_SETSCHEDPARAM(3)

NAME
pthread_setschedparam, pthread_getschedparam - control thread scheduling parameters SYNOPSIS
#include <pthread.h> int pthread_setschedparam(pthread_t target_thread, int policy, const struct sched_param *param); int pthread_getschedparam(pthread_t target_thread, int *policy, struct sched_param *param); DESCRIPTION
pthread_setschedparam sets the scheduling parameters for the thread target_thread as indicated by policy and param. policy can be either SCHED_OTHER (regular, non-realtime scheduling), SCHED_RR (realtime, round-robin) or SCHED_FIFO (realtime, first-in first-out). param spec- ifies the scheduling priority for the two realtime policies. See sched_setpolicy(2) for more information on scheduling policies. The realtime scheduling policies SCHED_RR and SCHED_FIFO are available only to processes with superuser privileges. pthread_getschedparam retrieves the scheduling policy and scheduling parameters for the thread target_thread and store them in the loca- tions pointed to by policy and param, respectively. RETURN VALUE
pthread_setschedparam and pthread_getschedparam return 0 on success and a non-zero error code on error. ERRORS
On error, pthread_setschedparam returns the following error codes: EINVAL policy is not one of SCHED_OTHER, SCHED_RR, SCHED_FIFO EINVAL the priority value specified by param is not valid for the specified policy EPERM the calling process does not have superuser permissions ESRCH the target_thread is invalid or has already terminated EFAULT param points outside the process memory space On error, pthread_getschedparam returns the following error codes: ESRCH the target_thread is invalid or has already terminated EFAULT policy or param point outside the process memory space AUTHOR
Xavier Leroy <Xavier.Leroy@inria.fr> SEE ALSO
sched_setscheduler(2), sched_getscheduler(2), sched_getparam(2), pthread_attr_setschedpolicy(3), pthread_attr_setschedparam(3). LinuxThreads PTHREAD_SETSCHEDPARAM(3)
Man Page