| <assertions> |
| <assertion id="1" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| sched_setscheduler() sets the scheduling policy and scheduling parameters of |
| the process specified by pid to policy and the parameters specified in the |
| sched_param structure pointed to by param, respectively |
| </assertion> |
| <assertion id="2" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| If pid is negative, the behavior of sched_setscheduler() is unspecified |
| </assertion> |
| <assertion id="3" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| If a process specified by pid exists, and if the calling process has |
| permission, the scheduling policy and scheduling parameters shall be set for |
| the process whose process ID is equal to pid |
| </assertion> |
| <assertion id="4" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| If pid is zero, the scheduling policy and scheduling parameters shall be set |
| for the calling process |
| </assertion> |
| <assertion id="5" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| The condition under which one process has the appropriate privilege to |
| change the scheduling parameters of another process are |
| implementation-defined |
| </assertion> |
| <assertion id="6" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| Implementations may require that the requesting process have permission to |
| set its own scheduling parameters or those of another process |
| </assertion> |
| <assertion id="7" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| Implementation-defined restrictions may apply as to the appropriate |
| privileges required to set a process' own scheduling policy, or another |
| process' scheduling policy, to a particular value |
| </assertion> |
| <assertion id="8" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| The sched_setscheduler() function shall be considered successful if it |
| succeeds in setting the scheduling policy and scheduling parameters of the |
| process specified by pid to the values specified by policy and the structure |
| pointed to by param, respectively |
| </assertion> |
| <assertion id="9" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION} pt:SS"> |
| The sched_ss_repl_period and sched_ss_init_budget members of the param |
| argument shall represent the time parameters used by the sporadic server |
| scheduling policy for the target process |
| </assertion> |
| <assertion id="10" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION} pt:SS"> |
| The sched_ss_max_repl member of the param argument shall represent the |
| maximum number of replenishments that are allowed to be pending |
| simultaneously for the process scheduled under this scheduling policy |
| </assertion> |
| <assertion id="11" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION} pt:SS"> |
| If the scheduling policy specified by policy is either SCHED_FIFO or |
| SCHED_RR, the sched_ss_low_priority, sched_ss_repl_period, and |
| sched_ss_init_budget members of the param argument shall have no effect on |
| the scheduling behavior |
| </assertion> |
| <assertion id="12" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| For threads with system scheduling contention scope, this function shall |
| have no effect on their scheduling |
| </assertion> |
| <assertion id="13" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| For threads with process scheduling contention scope, the threads' |
| scheduling policy and associated parameters shall not be affected |
| </assertion> |
| <assertion id="14" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| The underlying kernel-scheduled entities for the system contention scope |
| threads shall not be affected by this function |
| </assertion> |
| <assertion id="15" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| The underlying kernel-scheduled entities for the process contention scope |
| threads shall have their scheduling policy and associated scheduling |
| parameters changed to the values specified in policy and param, |
| respectively |
| </assertion> |
| <assertion id="16" tag="ref:XSH6:{System Interfaces:sched_setscheduler:RETURN VALUE}"> |
| Upon successful completion, the function shall return the former scheduling policy of the specified process |
| </assertion> |
| <assertion id="17" tag="ref:XSH6:{System Interfaces:sched_setscheduler:RETURN VALUE}"> |
| If the sched_setscheduler() function fails to complete successfully, the |
| policy and scheduling parameters shall remain unchanged |
| </assertion> |
| <assertion id="18" tag="ref:XSH6:{System Interfaces:sched_setscheduler:RETURN VALUE}"> |
| If the sched_setscheduler() function fails to complete successfully, the |
| function shall return a value of -1 |
| </assertion> |
| <assertion id="19" tag="ref:XSH6:{System Interfaces:sched_setscheduler:ERRORS}"> |
| The sched_setscheduler() function shall return EINVAL if the value of the |
| policy parameter is invalid, or one or more of the parameters contained in |
| param is outside the valid range for the specified scheduling policy |
| </assertion> |
| <assertion id="20" tag="ref:XSH6:{System Interfaces:sched_setscheduler:ERRORS}"> |
| The sched_setscheduler() function shall return EPERM if the requesting |
| process does not have permission to set either or both of the scheduling |
| parameters or the scheduling policy of the specified process |
| </assertion> |
| <assertion id="21" tag="ref:XSH6:{System Interfaces:sched_setscheduler:ERRORS}"> |
| The sched_setscheduler() function shall return ESRCH if no process can be |
| found corresponding to that specified by pid |
| </assertion> |
| |
| <assertion id="22" tag="ref:XSH6:{System Interfaces:sched_setscheduler:DESCRIPTION}"> |
| Kernel-scheduled entities for use by process contention scope threads that |
| are created after this call completes shall inherit their scheduling policy |
| and associated scheduling parameters from the process |
| </assertion> |
| </assertions> |