嵌入式学习小组
直播中

周奕

8年用户 176经验值
私信 关注

列表项的pxNext和pxPrevious是在什么地方初始化?

struct xLIST_ITEM
{
        listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE                        /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
        configLIST_VOLAtiLE TickType_t xItemValue;                        /*< The value being listed.  In most cases this is used to sort the list in descending order. */
        struct xLIST_ITEM * configLIST_VOLATILE pxNext;                /*< Pointer to the next ListItem_t in the list. */
        struct xLIST_ITEM * configLIST_VOLATILE pxPrevious;        /*< Pointer to the previous ListItem_t in the list. */
        void * pvOwner;                                                                                /*< Pointer to the object (normally a TCB) that contains the list item.  There is therefore a two way link between the object containing the list item and the list item itself. */
        void * configLIST_VOLATILE pvContainer;                                /*< Pointer to the list in which this list item is placed (if any). */
        listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE                        /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
};
typedef struct xLIST_ITEM ListItem_t;                                        /* For some reason lint wants this as two separate definitions. */

回帖(7)

王丽娟

2020-7-19 18:18:33
帮顶!!
举报

王莉淳

2020-7-19 18:31:15
???????????
举报

李蒙

2020-7-19 18:42:48
我自己先回答下吧:pxNext和pxPrevious应该不是在创建任务的时候初始化,可能是在比如任务切换的时候才会去操作这两个成员?左工 你回答下 在哪里会操作这两个成员?调用列表项插入的时候 好像会的…
举报

李雷

2020-7-19 18:54:51
调用列表项插入函数会使用这两个成员;那么操作系统什么时候会去用列表项插入函数来向某一个列表中插入一个列表项呢?会是任务切换的时候吗?
举报

更多回帖

发帖
×
20
完善资料,
赚取积分