typedef struct xLIST { listFIRST_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ configLIST_VOLATILE UBaseType_t uxNumberOfItems; ListItem_t * configLIST_VOLATILE pxIndex; /*< Used to walk through the list. Points to the last item returned by a call to listGET_OWNER_OF_NEXT_ENTRY (). */ MiniListItem_t xListEnd; /*< List item that contains the maximum possible item value meaning it is always at the end of the list and is therefore used as a marker. */ listSECOND_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ } List_t; 查看上文 #ifndef configLIST_VOLATILE #define configLIST_VOLATILE #endif / configLIST_VOLATILE在这里有什么用,为什么这么定义变量? |
* FreeRTOSConfig.h (without the quotes):
* "#define configLIST_VOLATILE volatile"
list.h里面已经注释很详细了,至于为啥这么定义,查一下volatile的用法就懂了