用户态支持调节优先级
This commit is contained in:
@@ -23,14 +23,9 @@ int main(int argc, char *args[])
|
||||
thread_exit_test();
|
||||
ipc_test();
|
||||
map_test();
|
||||
ipc_timeout_test();
|
||||
#endif
|
||||
// ipc_timeout_test();
|
||||
app_test();
|
||||
// while (1)
|
||||
// ;
|
||||
// factory_create_ipc(FACTORY_PROT, vpage_create_raw3(0, 0, 10));
|
||||
// factory_create_thread(FACTORY_PROT, vpage_create_raw3(0, 0, 11));
|
||||
// factory_create_task(FACTORY_PROT, vpage_create_raw3(0, 0, 12));
|
||||
task_unmap(TASK_THIS, vpage_create_raw3(KOBJ_DELETE_RIGHT, 0, TASK_THIS)); // 删除当前task,以及申请得所有对象
|
||||
printf("exit init.\n");
|
||||
return 0;
|
||||
|
||||
@@ -57,7 +57,7 @@ void app_test(void)
|
||||
tag = thread_msg_buf_set(hd_thread, ram_base + app->i.ram_size);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
ipc_bind(hd_ipc, hd_thread, 0);
|
||||
tag = thread_run(hd_thread);
|
||||
tag = thread_run(hd_thread, 2);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
|
||||
char *buf;
|
||||
|
||||
@@ -146,7 +146,7 @@ void ipc_test(void)
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_bind_task(th1_hd, TASK_THIS);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_run(th1_hd);
|
||||
tag = thread_run(th1_hd, 2);
|
||||
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = factory_create_thread(FACTORY_PROT, vpage_create_raw3(KOBJ_ALL_RIGHTS, 0, th2_hd));
|
||||
@@ -157,7 +157,7 @@ void ipc_test(void)
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_bind_task(th2_hd, TASK_THIS);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_run(th2_hd);
|
||||
tag = thread_run(th2_hd, 2);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
@@ -169,7 +169,7 @@ void ipc_test(void)
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_bind_task(th3_hd, TASK_THIS);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_run(th3_hd);
|
||||
tag = thread_run(th3_hd, 2);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ void map_test(void)
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_bind_task(th1_hd, TASK_THIS);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_run(th1_hd);
|
||||
tag = thread_run(th1_hd, 2);
|
||||
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = factory_create_thread(FACTORY_PROT, vpage_create_raw3(KOBJ_ALL_RIGHTS, 0, th2_hd));
|
||||
@@ -97,6 +97,6 @@ void map_test(void)
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_bind_task(th2_hd, TASK_THIS);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_run(th2_hd);
|
||||
tag = thread_run(th2_hd, 2);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ void thread_exit_test(void)
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_bind_task(th1_hd, TASK_THIS);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_run(th1_hd);
|
||||
tag = thread_run(th1_hd, 2);
|
||||
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = factory_create_thread(FACTORY_PROT, vpage_create_raw3(KOBJ_ALL_RIGHTS, 0, th2_hd));
|
||||
@@ -78,6 +78,6 @@ void thread_exit_test(void)
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_bind_task(th2_hd, TASK_THIS);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
tag = thread_run(th2_hd);
|
||||
tag = thread_run(th2_hd, 2);
|
||||
assert(msg_tag_get_prot(tag) >= 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user