?????????????????????????????????
???????????? ???????[ 2012/10/24 10:37:01 ] ????????
?????????rawos??????????У?rawos????????????????д????????????????????????????????????????б????????????????????????????????????????????????????????????С?????????????????????????????????????????飬????????????????漰?????????????????????????????????????????????????????????????????????????????????????????????????????????????????л???????????Υ????????????????????????????????????????????????????????????????????????????
????????????????????????ucos???????????????????????????????????????????????????????????????κλ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????е???????????????κζ???????????????????????????д???????????????????????????л???????????????rawos????????????????????
RAW_U16 raw_task_priority_change (RAW_TASK_OBJ *task_ptr?? RAW_U8 new_priority?? RAW_U8 *old_priority)
{
RAW_U8 ret_pri;
RAW_U16 error;
RAW_SR_ALLOC();
#if (RAW_TASK_FUNCTION_CHECK > 0)
if (task_ptr == 0) {
return RAW_NULL_OBJECT;
}
if (old_priority == 0) {
return RAW_NULL_OBJECT;
}
#endif
/*Idle task is not allowed to change priority*/
if (task_ptr->priority >= IDLE_PRIORITY) {
return RAW_CHANGE_PRIORITY_NOT_ALLOWED;
}
/*Not allowed change to idle priority*/
if (new_priority == IDLE_PRIORITY) {
return RAW_CHANGE_PRIORITY_NOT_ALLOWED;
}
RAW_CRITICAL_ENTER();
#if (CONFIG_RAW_MUTEX > 0)
ret_pri = chg_pri_mutex(task_ptr?? new_priority?? &error);
if (error != RAW_SUCCESS) {
goto error_exit;
}
task_ptr->bpriority = new_priority;
new_priority = ret_pri;
#else
task_ptr->bpriority = new_priority;
#endif
*old_priority = task_ptr->priority;
error = change_interal_task_priority(task_ptr?? new_priority);
if (error != RAW_SUCCESS) {
goto error_exit;
}
RAW_CRITICAL_EXIT();
do_possible_sche();
return RAW_SUCCESS;
error_exit:
RAW_CRITICAL_EXIT();
return error;
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11