1PTHREAD_ATTR_GETINHERITSCHEDP(OPS)IX Programmer's MaPnTuHaRlEAD_ATTR_GETINHERITSCHED(P)
2
3
4

NAME

6       pthread_attr_getinheritsched,  pthread_attr_setinheritsched  -  get and
7       set the inheritsched attribute (REALTIME THREADS)
8

SYNOPSIS

10       #include <pthread.h>
11
12       int pthread_attr_getinheritsched(const pthread_attr_t *restrict attr,
13              int *restrict inheritsched);
14       int pthread_attr_setinheritsched(pthread_attr_t *attr,
15              int inheritsched);
16
17

DESCRIPTION

19       The pthread_attr_getinheritsched(), and  pthread_attr_setinheritsched()
20       functions,  respectively,  shall get and set the inheritsched attribute
21       in the attr argument.
22
23       When the attributes objects are used by  pthread_create(),  the  inher‐
24       itsched attribute determines how the other scheduling attributes of the
25       created thread shall be set.
26
27       PTHREAD_INHERIT_SCHED
28
29              Specifies that the thread scheduling attributes shall be  inher‐
30              ited  from the creating thread, and the scheduling attributes in
31              this attr argument shall be ignored.
32
33       PTHREAD_EXPLICIT_SCHED
34
35              Specifies that the thread scheduling attributes shall be set  to
36              the corresponding values from this attributes object.
37
38
39       The   symbols   PTHREAD_INHERIT_SCHED  and  PTHREAD_EXPLICIT_SCHED  are
40       defined in the <pthread.h> header.
41
42       The    following    thread    scheduling    attributes    defined    by
43       IEEE Std 1003.1-2001 are affected by the inheritsched attribute: sched‐
44       uling policy ( schedpolicy), scheduling parameters (  schedparam),  and
45       scheduling contention scope ( contentionscope).
46

RETURN VALUE

48       If successful, the pthread_attr_getinheritsched() and pthread_attr_set‐
49       inheritsched() functions shall return zero; otherwise, an error  number
50       shall be returned to indicate the error.
51

ERRORS

53       The pthread_attr_setinheritsched() function may fail if:
54
55       EINVAL The value of inheritsched is not valid.
56
57       ENOTSUP
58              An  attempt  was  made  to  set  the attribute to an unsupported
59              value.
60
61
62       These functions shall not return an error code of [EINTR].
63
64       The following sections are informative.
65

EXAMPLES

67       None.
68

APPLICATION USAGE

70       After these attributes have been set, a thread can be created with  the
71       specified  attributes using pthread_create(). Using these routines does
72       not affect the current running thread.
73

RATIONALE

75       None.
76

FUTURE DIRECTIONS

78       None.
79

SEE ALSO

81       pthread_attr_destroy()        ,        pthread_attr_getscope()        ,
82       pthread_attr_getschedpolicy()    ,    pthread_attr_getschedparam()    ,
83       pthread_create() , the Base Definitions volume of IEEE Std 1003.1-2001,
84       <pthread.h>, <sched.h>
85
87       Portions  of  this text are reprinted and reproduced in electronic form
88       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
89       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
90       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
91       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
92       event of any discrepancy between this version and the original IEEE and
93       The  Open Group Standard, the original IEEE and The Open Group Standard
94       is the referee document. The original Standard can be  obtained  online
95       at http://www.opengroup.org/unix/online.html .
96
97
98
99IEEE/The Open Group                  2003      PTHREAD_ATTR_GETINHERITSCHED(P)
Impressum