打印

OSTaskNameSet是什么功能

[复制链接]
7357|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
pigeon0411|  楼主 | 2009-8-24 16:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
沙发
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]
:sleepy:[url][img][/img][/url]

使用特权

评论回复
5
lvpengandy| | 2011-5-15 22:30 | 只看该作者
就是给任务命名。没有什么太大的用处。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

42

主题

157

帖子

3

粉丝