feat: support EDF
方案描述: 1、liteos_a调度框架支持EDF调度算法,默认优先调度EDF策略的任务 2、用户态musl_c库适配新增调度算法,同步修改相关接口以支持用户态创建EDF进程与线程 BREAKING CHANGE: support EDF对外变更描述: 以下接口支持SCHED_DEADLINE调度策略: pthread_attr_getschedparam pthread_attr_setschedparam pthread_getschedparam pthread_setschedparam pthread_create sched_getscheduler sched_getparam sched_setparam sched_setscheduler Close:#I6T3P3 Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com> Change-Id: Ic9fe6896fcae42ae4ee7fe5dfb8e858a6ed19740
This commit is contained in:
@@ -181,6 +181,9 @@ static int StartClients(pthread_t *cli, int cliNum)
|
||||
for (int i = 0; i < cliNum; ++i) {
|
||||
ret = pthread_attr_init(&attr);
|
||||
param.sched_priority = param.sched_priority + 1;
|
||||
if (param.sched_priority > 31) { /* 31: prio */
|
||||
param.sched_priority = 31; /* 31: prio */
|
||||
}
|
||||
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
|
||||
pthread_attr_setschedparam(&attr, ¶m);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user