feat(kernel): 补充获取最高、最低优先级接口
【背景】 补充获取最高、最低优先级接口 【修改方案】 pthread补充这两个接口 int sched_get_priority_min(int policy) int sched_get_priority_max(int policy) 【影响】 对现有的产品编译不会有影响。 re #I42HM7 Signed-off-by: lnlanc <lanleinan@163.com> Change-Id: Id2ffc07e606ad497e8036f45dab1fa6a5ba981b3
This commit is contained in:
parent
403d6dc428
commit
c24c38b084
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue