1pthread_attr_getschedparamS(t3aCn)dard C Library Functpitohnrsead_attr_getschedparam(3C)
2
3
4

NAME

6       pthread_attr_getschedparam,  pthread_attr_setschedparam  -  get  or set
7       schedparam attribute
8

SYNOPSIS

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

DESCRIPTION

22       The functions pthread_attr_setschedparam()  and  pthread_attr_getsched‐
23       param(),  respectively, set and get the scheduling parameter attributes
24       in the attr argument. The contents of the param structure  are  defined
25       in <sched.h>. The only required member of param is sched_priority.
26

RETURN VALUES

28       If      successful,      the      pthread_attr_setschedparam()      and
29       pthread_attr_getschedparam() functions return  0. Otherwise,  an  error
30       number is returned to indicate the error.
31

ERRORS

33       The pthread_attr_setschedparam() function may fail if:
34
35       EINVAL    attr is invalid.
36
37
38
39       The pthread_attr_getschedparam() function may fail if:
40
41       EINVAL    attr or  param is invalid.
42
43

USAGE

45       After  these attributes have been set, a thread can be created with the
46       specified attributes using pthread_create(). Using these routines  does
47       not affect the current running thread.
48

ATTRIBUTES

50       See attributes(5) for descriptions of the following attributes:
51
52
53
54
55       ┌─────────────────────────────┬─────────────────────────────┐
56       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
57       ├─────────────────────────────┼─────────────────────────────┤
58       │Interface Stability          │Committed                    │
59       ├─────────────────────────────┼─────────────────────────────┤
60       │MT-Level                     │MT-Safe                      │
61       ├─────────────────────────────┼─────────────────────────────┤
62       │Standard                     │See standards(5).            │
63       └─────────────────────────────┴─────────────────────────────┘
64

SEE ALSO

66       pthread_attr_init(3C),   pthread_attr_setscope(3C),   pthread_attr_set‐
67       inheritsched(3C), pthread_attr_setschedpolicy(3C),  pthread_create(3C),
68       pthread_setschedparam(3C), attributes(5), standards(5)
69
70
71
72SunOS 5.11                        1 Apr 2008    pthread_attr_getschedparam(3C)
Impressum