Standard C Library Functions pthreadattrgetinheritsched(3C)
NAME
pthreadattrgetinheritsched, pthreadattrsetinheritsched -
get or set inheritsched attribute
SYNOPSIS
cc -mt [ flag... ] file... -lpthread [ library... ]
#include
int pthreadattrgetinheritsched(const pthreadattrt *restrict attr,
int *restrict inheritsched);
int pthreadattrsetinheritsched(pthreadattrt *attr, int inheritsched);
DESCRIPTION
The functions pthreadattrsetinheritsched() and
pthreadattrgetinheritsched(), respectively, set and get
the inheritsched attribute in the attr argument.
When the attribute objects are used by pthreadcreate(), the
inheritsched attribute determines how the other scheduling
attributes of the created thread are to be set:
PTHREADINHERITSCHED Specifies that the scheduling
policy and associated attributes
are to be inherited from the
creating thread, and the schedul-
ing attributes in this attr argu-
ment are to be ignored.
PTHREADEXPLICITSCHED Specifies that the scheduling
policy and associated attributes
are to be set to the correspond-
ing values from this attribute
object.
The symbols PTHREADINHERITSCHED and
PTHREADEXPLICITSCHED are defined in the header
.
RETURN VALUES
If successful, the pthreadattrsetinheritsched() and
pthreadattrgetinheritsched() functions return 0. Other-
wise, an error number is returned to indicate the error.
ERORS
SunOS 5.11 Last change: 23 Mar 2005 1
Standard C Library Functions pthreadattrgetinheritsched(3C)
The pthreadattrsetinheritsched() or
pthreadattrgetinheritsched() functions may fail if:
EINVAL attr or inheritsched 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:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Standard
MT-Level MT-Safe
SEE ALSO
pthreadattrgetschedparam(3C), pthreadattrinit(3C),
pthreadattrsetscope(3C), pthreadattrsetschedpolicy(3C),
pthreadcreate(3C), pthreadsetschedparam(3C), attri-
butes(5), standards(5)
SunOS 5.11 Last change: 23 Mar 2005 2
|