atheros_wifi/custom_src/osal/osal.c
A_STATUS qosal_task_set_priority(qosal_task_handle task_handle,
                                     A_UINT32      new_priority,
                                     A_VOID       *priority_ptr) {
  A_STATUS osal_ret = A_OK;
  osPriority_t priority;

  priority = osThreadGetPriority (task_handle);
  if(priority == osPriorityError) {
   osal_ret = A_ERROR;
  }
  *((A_UINT32 *)priority_ptr) = priority;

  if (new_priority <= (unsigned long)(osPriorityRealtime7)) {
    if(osThreadSetPriority (task_handle, (osPriority_t)new_priority) != osOK) {
      osal_ret = A_ERROR;
    }
  } else {
    osal_ret = A_ERROR;
  }
  return osal_ret;
}
/* 
 * Description: This function is used to set the current priority of the task 
 * 
 * Params: Task handle          
 *         Old priority 
 *         New priority
 * Returns: A_OK if Success, A_ERROR if Fail 
 */
This function is used to set the current priority of the task

Task handle
Old priority
New priority
Returns: A_OK if Success, A_ERROR if Fail
This function is used to set the current priority of the task Task handle Old priority New priority Returns : A_OK if Success A_ERROR if Fail
A_STATUS qosal_task_set_priority(qosal_task_handle task_handle,
                                     A_UINT32      new_priority,
                                     A_VOID       *priority_ptr) {
  A_STATUS osal_ret = A_OK;
  osPriority_t priority;
  priority = osThreadGetPriority (task_handle);
  if(priority == osPriorityError) {
   osal_ret = A_ERROR;
  }
  *((A_UINT32 *)priority_ptr) = priority;
  if (new_priority <= (unsigned long)(osPriorityRealtime7)) {
    if(osThreadSetPriority (task_handle, (osPriority_t)new_priority) != osOK) {
      osal_ret = A_ERROR;
    }
  } else {
    osal_ret = A_ERROR;
  }
  return osal_ret;
}
A_STATUS qosal_task_set_priority ( qosal_task_handle task_handle , A_UINT32 new_priority , A_VOID * priority_ptr ) { A_STATUS osal_ret = A_OK ; osPriority_t priority ; priority = osThreadGetPriority ( task_handle ) ; if ( priority == osPriorityError ) { osal_ret = A_ERROR ; } * ( ( A_UINT32 * ) priority_ptr ) = priority ; if ( new_priority <= ( unsigned long ) ( osPriorityRealtime7 ) ) { if ( osThreadSetPriority ( task_handle , ( osPriority_t ) new_priority ) != osOK ) { osal_ret = A_ERROR ; } } else { osal_ret = A_ERROR ; } return osal_ret ; }
Description: This function is used to set the current priority of the task
Description : This function is used to set the current priority of the task