1PTHREAD_ATTR_GETSCHEDPOLICY(P3OPS)IX Programmer's MaPnTuHaRlEAD_ATTR_GETSCHEDPOLICY(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       pthread_attr_getschedpolicy, pthread_attr_setschedpolicy - get and  set
13       the schedpolicy attribute (REALTIME THREADS)
14

SYNOPSIS

16       #include <pthread.h>
17
18       int pthread_attr_getschedpolicy(const pthread_attr_t *restrict attr,
19              int *restrict policy);
20       int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy);
21
22

DESCRIPTION

24       The   pthread_attr_getschedpolicy()  and  pthread_attr_setschedpolicy()
25       functions, respectively, shall get and set the schedpolicy attribute in
26       the attr argument.
27
28       The  supported values of policy shall include SCHED_FIFO, SCHED_RR, and
29       SCHED_OTHER, which are defined in the <sched.h> header.   When  threads
30       executing   with   the  scheduling  policy  SCHED_FIFO,  SCHED_RR,   or
31       SCHED_SPORADIC  are waiting on a mutex, they shall acquire the mutex in
32       priority order when the mutex is unlocked.
33

RETURN VALUE

35       If      successful,      the      pthread_attr_getschedpolicy()     and
36       pthread_attr_setschedpolicy() functions shall return  zero;  otherwise,
37       an error number shall be returned to indicate the error.
38

ERRORS

40       The pthread_attr_setschedpolicy() function may fail if:
41
42       EINVAL The value of policy is not valid.
43
44       ENOTSUP
45              An  attempt  was  made  to  set  the attribute to an unsupported
46              value.
47
48
49       These functions shall not return an error code of [EINTR].
50
51       The following sections are informative.
52

EXAMPLES

54       None.
55

APPLICATION USAGE

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

RATIONALE

62       None.
63

FUTURE DIRECTIONS

65       None.
66

SEE ALSO

68       pthread_attr_destroy(), pthread_attr_getscope(), pthread_attr_getinher‐
69       itsched(),  pthread_attr_getschedparam(),  pthread_create(),  the  Base
70       Definitions volume of IEEE Std 1003.1-2001, <pthread.h>, <sched.h>
71
73       Portions of this text are reprinted and reproduced in  electronic  form
74       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
75       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
76       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
77       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
78       event of any discrepancy between this version and the original IEEE and
79       The Open Group Standard, the original IEEE and The Open Group  Standard
80       is  the  referee document. The original Standard can be obtained online
81       at http://www.opengroup.org/unix/online.html .
82
83
84
85IEEE/The Open Group                  2003      PTHREAD_ATTR_GETSCHEDPOLICY(3P)
Impressum