mirror of
https://github.com/apache/nuttx.git
synced 2026-10-11 00:00:24 +00:00
fix run ltp_interfaces_sched_setscheduler_17_1 fail
The policy has changed when sched_setscheduler called invalid args. Signed-off-by: yintao <yintao@xiaomi.com>
This commit is contained in:
parent
69da13c86d
commit
beec3e4d80
1 changed files with 8 additions and 0 deletions
|
|
@ -96,6 +96,14 @@ int nxsched_set_scheduler(pid_t pid, int policy,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Verify that the requested priority is in the valid range */
|
||||
|
||||
if (param->sched_priority < SCHED_PRIORITY_MIN ||
|
||||
param->sched_priority > SCHED_PRIORITY_MAX)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Check if the task to modify the calling task */
|
||||
|
||||
if (pid == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue