1pthread_attr_getinheritschSetda(n3dCa)rd C Library Funpctthiroenasd_attr_getinheritsched(3C)
2
3
4

NAME

6       pthread_attr_getinheritsched, pthread_attr_setinheritsched - get or set
7       inheritsched attribute
8

SYNOPSIS

10       cc -mt [ flag... ] file... -lpthread [ library... ]
11       #include <pthread.h>
12
13       int pthread_attr_getinheritsched(const pthread_attr_t *restrict attr,
14            int *restrict inheritsched);
15
16
17       int pthread_attr_setinheritsched(pthread_attr_t *attr, int inheritsched);
18
19

DESCRIPTION

21       The functions pthread_attr_setinheritsched() and pthread_attr_getinher‐
22       itsched(),  respectively, set and get the inheritsched attribute in the
23       attr argument.
24
25
26       When the attribute objects are used  by  pthread_create(),  the  inher‐
27       itsched attribute determines how the other scheduling attributes of the
28       created thread are to be set:
29
30       PTHREAD_INHERIT_SCHED      Specifies that  the  scheduling  policy  and
31                                  associated  attributes  are  to be inherited
32                                  from the creating thread, and the scheduling
33                                  attributes  in  this attr argument are to be
34                                  ignored.
35
36
37       PTHREAD_EXPLICIT_SCHED     Specifies that  the  scheduling  policy  and
38                                  associated  attributes  are to be set to the
39                                  corresponding  values  from  this  attribute
40                                  object.
41
42
43
44       The  symbols   PTHREAD_INHERIT_SCHED  and   PTHREAD_EXPLICIT_SCHED  are
45       defined in the header <pthread.h>.
46

RETURN VALUES

48       If successful, the pthread_attr_setinheritsched() and pthread_attr_get‐
49       inheritsched()  functions  return   0.  Otherwise,  an  error number is
50       returned to indicate the error.
51

ERRORS

53       The  pthread_attr_setinheritsched()  or  pthread_attr_getinheritsched()
54       functions may fail if:
55
56       EINVAL    attr or inheritsched is invalid.
57
58

USAGE

60       After  these attributes have been set, a thread can be created with the
61       specified attributes using pthread_create(). Using these routines  does
62       not affect the current running thread.
63

ATTRIBUTES

65       See attributes(5) for descriptions of the following attributes:
66
67
68
69
70       ┌─────────────────────────────┬─────────────────────────────┐
71       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
72       ├─────────────────────────────┼─────────────────────────────┤
73       │Interface Stability          │Standard                     │
74       ├─────────────────────────────┼─────────────────────────────┤
75       │MT-Level                     │MT-Safe                      │
76       └─────────────────────────────┴─────────────────────────────┘
77

SEE ALSO

79       pthread_attr_getschedparam(3C),                  pthread_attr_init(3C),
80       pthread_attr_setscope(3C),             pthread_attr_setschedpolicy(3C),
81       pthread_create(3C),   pthread_setschedparam(3C),  attributes(5),  stan‐
82       dards(5)
83
84
85
86SunOS 5.11                        23 Mar 2005 pthread_attr_getinheritsched(3C)
Impressum