!236 补充两个获取最高\最低优先级的接口

Merge pull request !236 from lnlan/add_prio
This commit is contained in:
openharmony_ci 2021-07-28 02:11:05 +00:00 committed by Gitee
commit 71c76e8b08
1 changed files with 20 additions and 0 deletions

View File

@ -231,3 +231,23 @@ int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stackSize)
return 0;
}
int sched_get_priority_min(int policy)
{
if (policy != SCHED_RR) {
errno = EINVAL;
return -1;
}
return LOS_TASK_PRIORITY_LOWEST;
}
int sched_get_priority_max(int policy)
{
if (policy != SCHED_RR) {
errno = EINVAL;
return -1;
}
return LOS_TASK_PRIORITY_HIGHEST;
}