1posix_spawnattr_getschedpoSltiacnyd(a3rCd)C Library Fpuonscitxi_osnpsawnattr_getschedpolicy(3C)
2
3
4
6 posix_spawnattr_getschedpolicy, posix_spawnattr_setschedpolicy - get
7 and set spawn-schedpolicy attribute of spawn attributes object
8
10 #include <spawn.h>
11 #include <sched.h>
12
13 int posix_spawnattr_getschedpolicy(
14 const posix_spawnattr_t *restrict attr,
15 int *restrict schedpolicy);
16
17
18 int posix_spawnattr_setschedpolicy(posix_spawnattr_t *attr,
19 int schedpolicy);
20
21
23 The posix_spawnattr_getschedpolicy() function obtains the value of the
24 spawn-schedpolicy attribute from the attributes object referenced by
25 attr.
26
27
28 The posix_spawnattr_setschedpolicy() function sets the spawn-schedpol‐
29 icy attribute in an initialized attributes object referenced by attr.
30
31
32 The spawn-schedpolicy attribute represents the scheduling policy to be
33 assigned to the new process image in a spawn operation (if
34 POSIX_SPAWN_SETSCHEDULER is set in the spawn-flags attribute). The
35 default value of this attribute is unspecified.
36
38 Upon successful completion, posix_spawnattr_getschedpolicy() returns 0
39 and stores the value of the spawn-schedpolicy attribute of attr into
40 the object referenced by the schedpolicy parameter. Otherwise, an error
41 number is returned to indicate the error.
42
43
44 Upon successful completion, posix_spawnattr_setschedpolicy() returns 0.
45 Otherwise, an error number is returned to indicate the error.
46
48 These functions may fail if:
49
50 EINVAL The value specified by attr is invalid.
51
52
53
54 The posix_spawnattr_setschedpolicy() function may fail if:
55
56 EINVAL The value of the attribute being set is not valid.
57
58
60 See attributes(5) for descriptions of the following attributes:
61
62
63
64
65 ┌─────────────────────────────┬─────────────────────────────┐
66 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
67 ├─────────────────────────────┼─────────────────────────────┤
68 │Interface Stability │Standard │
69 ├─────────────────────────────┼─────────────────────────────┤
70 │MT-Level │MT-Safe │
71 └─────────────────────────────┴─────────────────────────────┘
72
74 posix_spawn(3C), posix_spawnattr_destroy(3C), posix_spawnattr_get‐
75 flags(3C), posix_spawnattr_getpgroup(3C), posix_spawnattr_getsched‐
76 param(3C), posix_spawnattr_getsigdefault(3C), posix_spawnattr_getsig‐
77 mask(3C), attributes(5), standards(5)
78
79
80
81SunOS 5.11 30 Jan 2004posix_spawnattr_getschedpolicy(3C)