Standard C Library Functions pthreadattrgetschedparam(3C)
NAME
pthreadattrgetschedparam, pthreadattrsetschedparam - get
or set schedparam attribute
SYNOPSIS
cc -mt [ flag... ] file... -lpthread [ library... ]
#include
int pthreadattrgetschedparam(const pthreadattrt *restrict attr,
struct schedparam *restrict param);
int pthreadattrsetschedparam(pthreadattrt *restrict attr,
const struct schedparam *restrict param);
DESCRIPTION
The functions pthreadattrsetschedparam() and
pthreadattrgetschedparam(), respectively, set and get the
scheduling parameter attributes in the attr argument. The
contents of the param structure are defined in .
The only required member of param is schedpriority.
RETURN VALUES
If successful, the pthreadattrsetschedparam() and
pthreadattrgetschedparam() functions return 0. Otherwise,
an error number is returned to indicate the error.
ERORS
The pthreadattrsetschedparam() function may fail if:
EINVAL attr is invalid.
The pthreadattrgetschedparam() function may fail if:
EINVAL attr or param is invalid.
USAGE
After these attributes have been set, a thread can be
created with the specified attributes using
pthreadcreate(). Using these routines does not affect the
current running thread.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 1 Apr 2008 1
Standard C Library Functions pthreadattrgetschedparam(3C)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
Standard See standards(5).
SEE ALSO
pthreadattrinit(3C), pthreadattrsetscope(3C),
pthreadattrsetinheritsched(3C),
pthreadattrsetschedpolicy(3C), pthreadcreate(3C),
pthreadsetschedparam(3C), attributes(5), standards(5)
SunOS 5.11 Last change: 1 Apr 2008 2
|