_lwp_getscheduler.2 (2010 09)

_
_lwp_getscheduler(2) _lwp_getscheduler(2)
NAME
_lwp_getscheduler() - get LWP(Lightweight Process) scheduling policy and parameters
SYNOPSIS
cc [ flag... ] file... -lpthread
#include <sys/lwp_sched.h>
int _lwp_getscheduler(int cmd, lwpid_t target_lwp, int *policy, struct
sched_param *param);
DESCRIPTION
The _lwp_getscheduler()
function allows the scheduling policy and parameters of an individual
LWP within any process to be retrieved.
The cmd argument determines the action to be performed by the
_lwp_getscheduler()
system call.
The following command is available. Other values of cmd are reserved for use by HP and may change
without notice. The behavior of _lwp_getscheduler is undefined if any other value is passed to the cmd
argument and it may change without notice.
LWP_SCHED_SPECIFIC
This request retrieves the scheduling policy and associated scheduling parameters for the LWP
whose LWP ID is specified by target_lwp and store those in policy and param , respectively. If
the value of target_lwp is zero (0), the target LWP will be the calling LWP.
The priority value returned shall be the value specified by the most recent
_lwp_setscheduler()
call affecting the target LWP(s) and will not reflect any temporary adjustments to its priority as a result
of any priority inheritance or ceiling functions.
Refer to the rtsched (2) manpage for a complete description of scheduling policies and priorities available.
_lwp_getscheduler()
is similar to the function sched_getscheduler() except that it operates
on lightweight processes instead of processes.
RETURN VALUE
Upon successful completion,
_lwp_getscheduler()
returns with a value of 0; otherwise, it returns
an error number to indicate the error. The
errno variable is NOT set if an error occurs.
ERRORS
For each of the following conditions, if the condition is detected, the
_lwp_getscheduler()
function
fails and returns the corresponding error number:
[EACCES] The target process could not be accessed due to compartmental restrictions.
[EFAULT] The param parameter or the policy parameter points to an illegal address.
[EINVAL] The cmd parameter is invalid.
[ESRCH] No LWP can be found corresponding to that specified by target_lwp .
WARNINGS
In general, the POSIX pthread interfaces should be used by multi-threaded applications. This system call
may be used directly only when the application has a need to operate on LWPs in another process. This
system call may result in undefined behavior if the usage is mixed with POSIX pthread APIs.
SEE ALSO
_lwp_setscheduler(2), sched_getscheduler(2), pthread_getschedparam(3t).
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)