?????????????????????????????????????????????????????????????????????????????????????????????Щ???????????????????????????????е???????????????????????????????????????????????????????????????????????????????????????????μ?????????????????????????????????????????????

RAW_U16 change_interal_task_priority(RAW_TASK_OBJ *task_ptr?? RAW_U8 new_priority)
{
 RAW_U8 old_pri;

 switch (task_ptr->task_state) {
  case RAW_RDY:
  
   remove_ready_list(&raw_ready_queue?? task_ptr);
   task_ptr->priority = new_priority;
  
   if (task_ptr == raw_task_active) {
    add_ready_list_head(&raw_ready_queue?? task_ptr);
   
   }
  
   else {
  
    add_ready_list_end(&raw_ready_queue?? task_ptr);
   }
 
   break;

  case RAW_DLY:                             /* Nothing to do except change the priority in the OS_TCB */
  case RAW_SUSPENDED:
  case RAW_DLY_SUSPENDED:
  
   task_ptr->priority = new_priority;                        /* Set new task priority*/
  
   break;

  case RAW_PEND:
  case RAW_PEND_TIMEOUT:
  case RAW_PEND_SUSPENDED:
  case RAW_PEND_TIMEOUT_SUSPENDED:
   old_pri = task_ptr->priority;
   task_ptr->priority = new_priority;
   change_pend_list_priority(task_ptr);
  
   #if (CONFIG_RAW_MUTEX > 0)
   mtx_chg_pri(task_ptr?? old_pri);
   #endif
  
   break;

  default:
  
   #if (CONFIG_RAW_ASSERT > 0)
   RAW_ASSERT(0);
   #endif
  
   return RAW_STATE_UNKNOWN;
 }

 return RAW_SUCCESS;

}