2 <assertion id="1" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
3 sched_setparam() sets the scheduling parameters to the parameters specified
4 in the sched_param structure pointed to by param
6 <assertion id="2" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
7 Higher numerical values for the priority represent higher priorities
9 <assertion id="3" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
10 If pid is negative, the behavior of sched_setparam() is unspecified
12 <assertion id="4" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
13 If a process specified by pid exists, and if the calling process has
14 permission, the scheduling parameters shall be set for the process whose
15 process ID is equal to pid
17 <assertion id="5" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
18 If pid is zero, the scheduling parameters shall be set for the calling
21 <assertion id="6" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
22 The conditions under which one process has permission to change the
23 scheduling parameters of another process are implementation-defined
25 <assertion id="7" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
26 Implementations may require the requesting process to have the appropriate
27 privilege to set its own scheduling parameters or those of another process
29 <assertion id="8" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
30 The target process, whether it is running or not running, shall be moved to
31 the tail of the thread list for its priority
33 <assertion id="9" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
34 If the priority of the process specified by the pid argument is set higher
35 than that of the lowest priority running process and if the specified
36 process is ready to run, the process specified by the pid argument shall
37 preempt a lowest priority running process
39 <assertion id="10" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
40 If the process calling sched_setparam() sets its own priority lower than
41 that of one or more other non-empty process lists, then the process that is
42 the head of the highest priority list shall preempt the calling process
44 <assertion id="11" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
45 The originating process might not receive notification of the completion of
46 the requested priority change until the higher priority process has
49 <assertion id="12" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION} pt:SS">
50 The sched_ss_repl_period and sched_ss_init_budget members of the param
51 argument shall represent the time parameters to be used by the sporadic
52 server scheduling policy for the target process
54 <assertion id="13" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION} pt:SS">
55 The sched_ss_max_repl member of the param argument shall represent the
56 maximum number of replenishments that are allowed to be pending
57 simultaneously for the process scheduled under the SCHED_SPORADIC policy
59 <assertion id="14" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION} pt:SS">
60 If the scheduling policy of the target process is either SCHED_FIFO or
61 SCHED_RR, the sched_ss_low_priority, sched_ss_repl_period, and
62 sched_ss_init_budget members of the param argument shall have no effect on
63 the scheduling behavior
65 <assertion id="15" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION} pt:SS">
66 If the scheduling policy of the target process is not SCHED_FIFO, SCHED_RR,
67 or SCHED_SPORADIC, the effects of the sched_ss_low_priority,
68 sched_ss_repl_period, and sched_ss_init_budget members are
69 implementation-defined (this case includes the SCHED_OTHER policy)
71 <assertion id="16" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
72 If the current scheduling policy for the process specified by pid is not
73 SCHED_FIFO, SCHED_RR or SCHED_SPORADIC, the result is
74 implementation-defined; this case includes the SCHED_OTHER policy
76 <assertion id="17" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
77 For threads with system scheduling contention scope, this function shall have no effect on their scheduling
79 <assertion id="18" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
80 For threads with process scheduling contention scope, the threads' scheduling policy and associated parameters shall not be affected
82 <assertion id="19" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
83 The underlying kernel-scheduled entities for the system contention scope threads shall not be affected by this function
85 <assertion id="20" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
86 The underlying kernel-scheduled entities for the process contention scope
87 threads shall have their scheduling parameters changed to the value
90 <assertion id="21" tag="ref:XSH6:{System Interfaces:sched_setparam:DESCRIPTION}">
91 Kernel-scheduled entities for use by process contention scope threads that
92 are created after this call completes shall inherit their scheduling policy
93 and associated scheduling parameters from the process
95 <assertion id="22" tag="ref:XSH6:{System Interfaces:sched_setparam:RETURN VALUE}">
96 If successful, the sched_setparam() function shall return zero
98 <assertion id="23" tag="ref:XSH6:{System Interfaces:sched_setparam:RETURN VALUE}">
99 If the call to sched_setparam() is unsuccessful, the priority shall remain
102 <assertion id="24" tag="ref:XSH6:{System Interfaces:sched_setparam:RETURN VALUE">
103 If the call to sched_setparam() is unsuccessful, the function shall return a
106 <assertion id="25" tag="ref:XSH6:{System Interfaces:sched_setparam:ERRORS}">
107 sched_setparam() sets errno == EINVAL when one or more of the requested
108 scheduling parameters is outside the range defined for the scheduling policy
111 <assertion id="26" tag="ref:XSH6:{System Interfaces:sched_setparam:ERRORS}">
112 sched_setparam() sets errno == EPERM when the requesting process does not
113 have permission to set the scheduling parameters for the specified process,
114 or does not have the appropriate privilege to invoke schedparam()
116 <assertion id="27" tag="ref:XSH6:{System Interfaces:sched_setparam:ERRORS}">
117 sched_setparam() sets errno == ESRCH when no process can be found
118 corresponding to that specified by pid