what is v and x means in freeRTOS task creating or used in it?

回眸只為那壹抹淺笑 提交于 2020-01-10 03:54:23

问题


what does mean x and v in task creating or managing of free RTOS? xTaskcreate or vTaskcreate?


回答1:


The leading character(s) of the FreeRTOS functions identify the return type of the function. Functions that start with "v" return void. Functions that start with "x" typically return a result code or handle. See the Naming Conventions page of the FreeRTOS coding standard.




回答2:


Acording to FreeRTOS Documentation:

  • Variables of non stdint types are prefixed x. Examples include BaseType_t and TickType_t, which are portable layer defined typedefs for the natural or most efficient type for the architecture and the type used to hold the RTOS tick count respectively.

  • Variables of type size_t are also prefixed x.

  • API functions are prefixed with their return type, as per the convention defined for variables, with the addition of the prefix v for void.

In addition, the second part of the variable/function name, for example Task, indicates the file in which the variable/function implemented, i.e. task.c.



来源:https://stackoverflow.com/questions/32199690/what-is-v-and-x-means-in-freertos-task-creating-or-used-in-it

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!