pigeon0411 发表于 2009-8-24 16:48

OSTaskNameSet是什么功能

在UCOS II V2.86之后多了一些功能函数,请问
类似这个函数:
#if OS_TASK_NAME_SIZE > 13
    OSTaskNameSet(APP_TASK_START_PRIO, "Start Task", &err);
#endif
是什么意思?

pigeon0411 发表于 2009-8-24 16:52

不知道大家用UCOS用的多不

pigeon0411 发表于 2009-8-24 16:57

本帖最后由 pigeon0411 于 2009-8-24 17:01 编辑

/*$PAGE*/
/*
*********************************************************************************************************
*                                        ASSIGN A NAME TO A TASK
*
* Description: This function is used to set the name of a task.
*
* Arguments: prio      is the priority of the task that you want the assign a name to.
*
*            pname   is a pointer to an ASCII string that contains the name of the task.The ASCII
*                        string must be NUL terminated.
*
*            perr       is a pointer to an error code that can contain one of the following values:
*
*                        OS_ERR_NONE                if the requested task is resumed
*                        OS_ERR_TASK_NOT_EXIST      if the task has not been created or is assigned to a Mutex
*                        OS_ERR_TASK_NAME_TOO_LONGif the name you are giving to the task exceeds the
*                                                   storage capacity of a task name as specified by
*                                                   OS_TASK_NAME_SIZE.
*                        OS_ERR_PNAME_NULL          You passed a NULL pointer for 'pname'
*                        OS_ERR_PRIO_INVALID      if you specified an invalid priority:
*                                                   A higher value than the idle task or not OS_PRIO_SELF.
*                        OS_ERR_NAME_SET_ISR      if you called this function from an ISR
*
* Returns    : None
*********************************************************************************************************
*/

字面意思明白,但还是没明白设置任务名有什么实际意义。

pigeon0411 发表于 2009-8-24 17:02

te]:sleepy:

lvpengandy 发表于 2011-5-15 22:30

就是给任务命名。没有什么太大的用处。
页: [1]
查看完整版本: OSTaskNameSet是什么功能