1sched_getscheduler(3C)   Standard C Library Functions   sched_getscheduler(3C)
2
3
4

NAME

6       sched_getscheduler - get scheduling policy
7

SYNOPSIS

9       #include <sched.h>
10
11       int sched_getscheduler(pid_t pid);
12
13

DESCRIPTION

15       The  sched_getscheduler() function returns the scheduling policy of the
16       process specified by pid. If the value of pid is negative, the behavior
17       of the sched_getscheduler() function is unspecified.
18
19
20       The  values that can be returned by sched_getscheduler() are defined in
21       the header <sched.h> and described on the sched_setscheduler(3C) manual
22       page.
23
24
25       If  a  process  specified  by pid exists and if the calling process has
26       permission, the scheduling policy will  be  returned  for  the  process
27       whose process ID is equal to pid.
28
29
30       If  pid  is  0,  the scheduling policy will be returned for the calling
31       process.
32

RETURN VALUES

34       Upon successful completion, the sched_getscheduler()  function  returns
35       the  scheduling  policy  of the specified process. If unsuccessful, the
36       function returns −1 and sets errno to indicate the error.
37

ERRORS

39       The  sched_getscheduler() function will fail if:
40
41       EPERM    The requesting process does not have permission  to  determine
42                the scheduling policy of the specified process.
43
44
45       ESRCH    No  process  can  be  found corresponding to that specified by
46                pid.
47
48

ATTRIBUTES

50       See attributes(5) for descriptions of the following attributes:
51
52
53
54
55       ┌─────────────────────────────┬─────────────────────────────┐
56ATTRIBUTE 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       librt(3LIB),  sched.h(3HEAD),  sched_getparam(3C),  sched_setparam(3C),
67       sched_setscheduler(3C), attributes(5), standards(5)
68
69
70
71SunOS 5.11                        1 Apr 2008            sched_getscheduler(3C)
Impressum