OSTaskNameSet是什么功能

[复制链接]
8678|4
 楼主| pigeon0411 发表于 2009-8-24 16:48 | 显示全部楼层 |阅读模式
在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_LONG  if 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 | 显示全部楼层
[quote][/quote]
  1. :sleepy:[url][img][/img][/url]
lvpengandy 发表于 2011-5-15 22:30 | 显示全部楼层
就是给任务命名。没有什么太大的用处。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

42

主题

157

帖子

3

粉丝
快速回复 在线客服 返回列表 返回顶部