{"id":38983,"date":"2025-05-21T22:03:37","date_gmt":"2025-05-21T14:03:37","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/38983.html"},"modified":"2025-05-21T22:03:37","modified_gmt":"2025-05-21T14:03:37","slug":"freertos%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0%e3%80%9011%e3%80%91-%e4%bb%bb%e5%8a%a1%e5%88%97%e8%a1%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/38983.html","title":{"rendered":"FreeRTOS\u5b66\u4e60\u7b14\u8bb0\u301011\u3011-----\u4efb\u52a1\u5217\u8868"},"content":{"rendered":"<p>\u6839\u636eb\u7ad9up freeRTOS\u6e90\u7801<\/p>\n<h2>\u6570\u636e\u7ed3\u6784<\/h2>\n<h4>1 TCB&#xff08;task control block&#xff09;<\/h4>\n<p><span class=\"token keyword\">typedef<\/span> <span class=\"token keyword\">struct<\/span> <span class=\"token class-name\">tskTaskControlBlock<\/span>       <span class=\"token comment\">\/* The old naming convention is used to prevent breaking kernel aware debuggers. *\/<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">volatile<\/span> StackType_t <span class=\"token operator\">*<\/span> pxTopOfStack<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/**&lt; Points to the location of the last item placed on the tasks stack.  THIS MUST BE THE FIRST MEMBER OF THE TCB STRUCT. *\/<\/span><br \/>\n    <span class=\"token comment\">\/\/\u6307\u5411\u4efb\u52a1\u6808\u9876\u90e8\u7684\u6307\u9488<\/span><br \/>\n    ListItem_t xStateListItem<span class=\"token punctuation\">;<\/span>                  <span class=\"token comment\">\/**&lt; The list that the state list item of a task is reference from denotes the state of that task (Ready, Blocked, Suspended ). *\/<\/span><br \/>\n    <span class=\"token comment\">\/\/\u7528\u4e8e\u5c06\u4efb\u52a1\u94fe\u63a5\u5230\u4e0d\u540c\u72b6\u6001\u5217\u8868&#xff08;\u5c31\u7eea\u3001\u963b\u585e\u3001\u6302\u8d77&#xff09;\u7684\u5217\u8868\u9879\u3002<\/span><br \/>\n    ListItem_t xEventListItem<span class=\"token punctuation\">;<\/span>                  <span class=\"token comment\">\/**&lt; Used to reference a task from an event list. *\/<\/span><br \/>\n    <span class=\"token comment\">\/\/\u7528\u4e8e\u5c06\u4efb\u52a1\u94fe\u63a5\u5230\u4e8b\u4ef6\u5217\u8868\u7684\u5217\u8868\u9879\u3002<\/span><br \/>\n    UBaseType_t uxPriority<span class=\"token punctuation\">;<\/span>                     <span class=\"token comment\">\/**&lt; The priority of the task.  0 is the lowest priority. *\/<\/span><br \/>\n    <span class=\"token comment\">\/\/\u4efb\u52a1\u7684\u4f18\u5148\u7ea7&#xff0c;\u6570\u503c\u8d8a\u5c0f\u4f18\u5148\u7ea7\u8d8a\u4f4e\u3002<\/span><br \/>\n    StackType_t <span class=\"token operator\">*<\/span> pxStack<span class=\"token punctuation\">;<\/span>                      <span class=\"token comment\">\/**&lt; Points to the start of the stack. *\/<\/span><br \/>\n    <span class=\"token comment\">\/\/\u6307\u5411\u4efb\u52a1\u6808\u8d77\u59cb\u5730\u5740\u7684\u6307\u9488<\/span><br \/>\n    <span class=\"token keyword\">char<\/span> pcTaskName<span class=\"token punctuation\">[<\/span> configMAX_TASK_NAME_LEN <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span> tskTCB<span class=\"token punctuation\">;<\/span><\/p>\n<h4>2 \u4efb\u52a1\u5217\u8868\u9879<\/h4>\n<p><span class=\"token keyword\">struct<\/span> <span class=\"token class-name\">xLIST_ITEM<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE           <span class=\"token comment\">\/**&lt; Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. *\/<\/span><\/p>\n<p>    configLIST_VOLATILE TickType_t xItemValue<span class=\"token punctuation\">;<\/span>          <span class=\"token comment\">\/**&lt; The value being listed.  In most cases this is used to sort the list in ascending order. *\/<\/span><\/p>\n<p>    <span class=\"token keyword\">struct<\/span> <span class=\"token class-name\">xLIST_ITEM<\/span> <span class=\"token operator\">*<\/span> configLIST_VOLATILE pxNext<span class=\"token punctuation\">;<\/span>     <span class=\"token comment\">\/**&lt; Pointer to the next ListItem_t in the list. *\/<\/span><\/p>\n<p>    <span class=\"token keyword\">struct<\/span> <span class=\"token class-name\">xLIST_ITEM<\/span> <span class=\"token operator\">*<\/span> configLIST_VOLATILE pxPrevious<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/**&lt; Pointer to the previous ListItem_t in the list. *\/<\/span><\/p>\n<p>    <span class=\"token keyword\">void<\/span> <span class=\"token operator\">*<\/span> pvOwner<span class=\"token punctuation\">;<\/span>                                     <span class=\"token comment\">\/**&lt; 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. *\/<\/span><br \/>\n    <span class=\"token comment\">\/\/\u6307\u5411\u201c\u62e5\u6709\u201d\u8be5 list item \u7684\u5bf9\u8c61\u3002\u901a\u5e38\u662f\u4e00\u4e2a\u4efb\u52a1\u63a7\u5236\u5757&#xff08;TCB&#xff09;\u3002<\/span><br \/>\n    <span class=\"token keyword\">struct<\/span> <span class=\"token class-name\">xLIST<\/span> <span class=\"token operator\">*<\/span> configLIST_VOLATILE pxContainer<span class=\"token punctuation\">;<\/span>     <span class=\"token comment\">\/**&lt; Pointer to the list in which this list item is placed (if any). *\/<\/span><br \/>\n    <span class=\"token comment\">\/\/\u6307\u5217\u8868\u9879\u6240\u5904\u7684\u5217\u8868&#xff08;\u5c31\u7eea\u5217\u8868\u3001delay\u5217\u8868\u3001\u6302\u8d77\u5217\u8868&#xff09;<\/span><br \/>\n    listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE          <span class=\"token comment\">\/**&lt; Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. *\/<\/span><\/p>\n<p><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">typedef<\/span> <span class=\"token keyword\">struct<\/span> <span class=\"token class-name\">xLIST_ITEM<\/span> ListItem_t<span class=\"token punctuation\">;<\/span><\/p>\n<h4>3 \u5217\u8868\u5934<\/h4>\n<p><span class=\"token keyword\">typedef<\/span> <span class=\"token keyword\">struct<\/span> <span class=\"token class-name\">xLIST<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    listFIRST_LIST_INTEGRITY_CHECK_VALUE      <span class=\"token comment\">\/**&lt; Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. *\/<\/span><\/p>\n<p>    configLIST_VOLATILE UBaseType_t uxNumberOfItems<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/**&lt; Number of items in the list. *\/<\/span><\/p>\n<p>    ListItem_t <span class=\"token operator\">*<\/span> configLIST_VOLATILE pxIndex<span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/**&lt; Used to walk through the list.  Points to the last item returned by a call to listGET_OWNER_OF_NEXT_ENTRY (). *\/<\/span><br \/>\n    <span class=\"token comment\">\/\/\u6307\u5411\u5217\u8868\u7684\u6307\u9488<\/span><br \/>\n    MiniListItem_t xListEnd<span class=\"token punctuation\">;<\/span>                  <span class=\"token comment\">\/**&lt; 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. *\/<\/span><br \/>\n    <span class=\"token comment\">\/\/\u5c3e\u8282\u70b9<\/span><br \/>\n    listSECOND_LIST_INTEGRITY_CHECK_VALUE     <span class=\"token comment\">\/**&lt; Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. *\/<\/span><\/p>\n<p><span class=\"token punctuation\">}<\/span> List_t<span class=\"token punctuation\">;<\/span><\/p>\n<h2>\u5217\u8868\u4ee3\u7801<\/h2>\n<h4>1 \u5217\u8868\u521d\u59cb\u5316<\/h4>\n<p>freeRTOS\u7684\u5217\u8868\u53d8\u91cf&#xff1a;<\/p>\n<p>PRIVILEGED_DATA <span class=\"token keyword\">static<\/span> List_t pxReadyTasksLists<span class=\"token punctuation\">[<\/span> configMAX_PRIORITIES <span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/**&lt; \u7528\u4e8e\u5b58\u50a8\u5c31\u7eea\u6001&#xff08;Ready&#xff09;\u7684\u4efb\u52a1\u5217\u8868. *\/<\/span><br \/>\nPRIVILEGED_DATA <span class=\"token keyword\">static<\/span> List_t xDelayedTaskList1<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/**&lt; \u7528\u4e8e\u5b58\u50a8\u5ef6\u8fdf&#xff08;Delayed&#xff09;\u7684\u4efb\u52a1 *\/<\/span><br \/>\nPRIVILEGED_DATA <span class=\"token keyword\">static<\/span> List_t xDelayedTaskList2<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/**&lt; xDelayedTaskList2 \u7528\u4e8e\u5b58\u50a8\u90a3\u4e9b\u5ef6\u8fdf\u65f6\u95f4\u8d85\u8fc7\u4e86\u5f53\u524d tick \u8ba1\u6570\u8303\u56f4\u7684\u4efb\u52a1. *\/<\/span><br \/>\nPRIVILEGED_DATA <span class=\"token keyword\">static<\/span> List_t <span class=\"token operator\">*<\/span> <span class=\"token keyword\">volatile<\/span> pxDelayedTaskList<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/**&lt; \u5f53\u524d\u6b63\u5728\u4f7f\u7528\u7684\u5ef6\u8fdf\u4efb\u52a1\u5217\u8868.\u5ef6\u8fdf\u65f6\u95f4\u8d85\u8fc7\u4e86\u5f53\u524d tick \u8ba1\u6570\u5668\u7684\u8303\u56f4\u65f6&#xff0c;\u8fd9\u4e9b\u4efb\u52a1\u4f1a\u88ab\u653e\u5165  *\/<\/span><br \/>\nPRIVILEGED_DATA <span class=\"token keyword\">static<\/span> List_t <span class=\"token operator\">*<\/span> <span class=\"token keyword\">volatile<\/span> pxOverflowDelayedTaskList<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/**&lt; \u6307\u5411\u5f53\u524d\u7528\u4e8e\u5b58\u50a8\u6ea2\u51fa\u5ef6\u8fdf\u4efb\u52a1\u7684\u5217\u8868. *\/<\/span><br \/>\nPRIVILEGED_DATA <span class=\"token keyword\">static<\/span> List_t xPendingReadyList<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/**&lt; \u7528\u4e8e\u5b58\u50a8\u90a3\u4e9b\u7531\u4e8e\u67d0\u4e9b\u4e8b\u4ef6&#xff08;\u5982\u4fe1\u53f7\u91cf\u91ca\u653e\u3001\u961f\u5217\u64cd\u4f5c\u7b49&#xff09;\u800c\u53d8\u4e3a\u5c31\u7eea\u6001\u7684\u4efb\u52a1 *\/<\/span><\/p>\n<h4>2 \u5217\u8868\u521d\u59cb\u5316<\/h4>\n<p>pxList<span class=\"token operator\">-&gt;<\/span>pxIndex <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span> ListItem_t <span class=\"token operator\">*<\/span> <span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;<\/span><span class=\"token punctuation\">(<\/span> pxList<span class=\"token operator\">-&gt;<\/span>xListEnd <span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>pxList<span class=\"token operator\">-&gt;<\/span>xListEnd<span class=\"token punctuation\">.<\/span>xItemValue <span class=\"token operator\">&#061;<\/span> portMAX_DELAY<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/0xffffffffU <\/span><br \/>\npxList<span class=\"token operator\">-&gt;<\/span>xListEnd<span class=\"token punctuation\">.<\/span>pxNext <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span> ListItem_t <span class=\"token operator\">*<\/span> <span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;<\/span><span class=\"token punctuation\">(<\/span> pxList<span class=\"token operator\">-&gt;<\/span>xListEnd <span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>pxList<span class=\"token operator\">-&gt;<\/span>xListEnd<span class=\"token punctuation\">.<\/span>pxPrevious <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span> ListItem_t <span class=\"token operator\">*<\/span> <span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;<\/span><span class=\"token punctuation\">(<\/span> pxList<span class=\"token operator\">-&gt;<\/span>xListEnd <span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>pxList<span class=\"token operator\">-&gt;<\/span>uxNumberOfItems <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span> UBaseType_t <span class=\"token punctuation\">)<\/span> <span class=\"token number\">0U<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>3 Insert \u51fd\u6570<\/h4>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token function\">vListInsert<\/span><span class=\"token punctuation\">(<\/span> List_t <span class=\"token operator\">*<\/span> <span class=\"token keyword\">const<\/span> pxList<span class=\"token punctuation\">,<\/span><br \/>\n                  ListItem_t <span class=\"token operator\">*<\/span> <span class=\"token keyword\">const<\/span> pxNewListItem <span class=\"token punctuation\">)<\/span><\/p>\n<p>pxList \u8981\u63d2\u5165\u7684\u5217\u8868&#xff0c; pxNewListItem \u8981\u63d2\u5165\u7684\u5217\u8868\u9879<\/p>\n<p>ListItem_t <span class=\"token operator\">*<\/span> pxIterator<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/\u5c06\u65b0\u5217\u8868\u9879\u63d2\u5165\u5728pxIterator\u6307\u5411\u4f4d\u7f6e\u7684\u540e\u9762<\/span><br \/>\n    pxNewListItem<span class=\"token operator\">-&gt;<\/span>pxNext <span class=\"token operator\">&#061;<\/span> pxIterator<span class=\"token operator\">-&gt;<\/span>pxNext<span class=\"token punctuation\">;<\/span><br \/>\n    pxNewListItem<span class=\"token operator\">-&gt;<\/span>pxNext<span class=\"token operator\">-&gt;<\/span>pxPrevious <span class=\"token operator\">&#061;<\/span> pxNewListItem<span class=\"token punctuation\">;<\/span><br \/>\n    pxNewListItem<span class=\"token operator\">-&gt;<\/span>pxPrevious <span class=\"token operator\">&#061;<\/span> pxIterator<span class=\"token punctuation\">;<\/span><br \/>\n    pxIterator<span class=\"token operator\">-&gt;<\/span>pxNext <span class=\"token operator\">&#061;<\/span> pxNewListItem<span class=\"token punctuation\">;<\/span><\/p>\n<p>\u90a3\u4e48&#xff0c;pxIterator\u7684\u662f\u5982\u4f55\u5b9a\u4f4d\u7684\u5462&#xff1f;<\/p>\n<p><span class=\"token comment\">\/\/\u5982\u679cvalue\u6700\u5927&#xff0c;\u5c31\u653e\u5728\u5c3e\u7ed3\u70b9\u7684\u524d\u9762<\/span><br \/>\n    <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span> xValueOfInsertion <span class=\"token operator\">&#061;&#061;<\/span> portMAX_DELAY <span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        pxIterator <span class=\"token operator\">&#061;<\/span> pxList<span class=\"token operator\">-&gt;<\/span>xListEnd<span class=\"token punctuation\">.<\/span>pxPrevious<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token keyword\">else<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/\u521d\u59cb\u5316&#xff0c;\u8fed\u4ee3\u5668\u6307\u5411\u5c3e\u90e8<\/span><br \/>\n    <span class=\"token comment\">\/\/\u505c\u6b62\u6761\u4ef6&#xff0c;\u8fed\u4ee3\u5668\u7684\u4e0b\u4e00\u4e2a\u8282\u70b9\u7684\u503c\u5c0f\u4e8e\u7b49\u4e8e\u5f53\u524d\u503c<\/span><br \/>\n    <span class=\"token comment\">\/\/\u5426\u5219 \u8fed\u4ee3\u5668\u6307\u5411\u4e0b\u4e00\u4e2a\u8282\u70b9<\/span><br \/>\n        <span class=\"token keyword\">for<\/span><span class=\"token punctuation\">(<\/span> pxIterator <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span> ListItem_t <span class=\"token operator\">*<\/span> <span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;<\/span><span class=\"token punctuation\">(<\/span> pxList<span class=\"token operator\">-&gt;<\/span>xListEnd <span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            pxIterator<span class=\"token operator\">-&gt;<\/span>pxNext<span class=\"token operator\">-&gt;<\/span>xItemValue <span class=\"token operator\">&lt;&#061;<\/span> xValueOfInsertion<span class=\"token punctuation\">;<\/span><br \/>\n            pxIterator <span class=\"token operator\">&#061;<\/span> pxIterator<span class=\"token operator\">-&gt;<\/span>pxNext <span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token comment\">\/* There is nothing to do here, just iterating to the wanted<br \/>\n             * insertion position. *\/<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><\/p>\n<h4>4 InsertEnd\u51fd\u6570<\/h4>\n<p>\u8fd9\u91cc\u7684End\u662f\u5bf9\u4e8e\u904d\u5386\u800c\u8a00\u7684End&#xff0c; \u5728listGET_OWNER_OF_NEXT_ENTRY\u4e2d&#xff0c;\u9700\u8981\u5bf9list\u8fdb\u884c\u904d\u5386<\/p>\n<p>    <span class=\"token keyword\">do<\/span> <span class=\"token punctuation\">{<\/span>                                                                                       \\\\<br \/>\n        List_t <span class=\"token operator\">*<\/span> <span class=\"token keyword\">const<\/span> pxConstList <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span> pxList <span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>                                               \\\\<br \/>\n        <span class=\"token comment\">\/* Increment the index to the next item and return the item, ensuring *\/<\/span>               \\\\<br \/>\n        <span class=\"token comment\">\/* we don&#039;t return the marker used at the end of the list.  *\/<\/span>                         \\\\<br \/>\n        <span class=\"token punctuation\">(<\/span> pxConstList <span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span>pxIndex <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span> pxConstList <span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span>pxIndex<span class=\"token operator\">-&gt;<\/span>pxNext<span class=\"token punctuation\">;<\/span>                           \\\\<br \/>\n        <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span> <span class=\"token punctuation\">(<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token operator\">*<\/span> <span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">(<\/span> pxConstList <span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span>pxIndex <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token punctuation\">(<\/span> <span class=\"token keyword\">void<\/span> <span class=\"token operator\">*<\/span> <span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;<\/span><span class=\"token punctuation\">(<\/span> <span class=\"token punctuation\">(<\/span> pxConstList <span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span>xListEnd <span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">)<\/span> \\\\<br \/>\n        <span class=\"token punctuation\">{<\/span>                                                                                      \\\\<br \/>\n            <span class=\"token punctuation\">(<\/span> pxConstList <span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span>pxIndex <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span> pxConstList <span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span>xListEnd<span class=\"token punctuation\">.<\/span>pxNext<span class=\"token punctuation\">;<\/span>                       \\\\<br \/>\n        <span class=\"token punctuation\">}<\/span>                                                                                      \\\\<br \/>\n        <span class=\"token punctuation\">(<\/span> pxTCB <span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">(<\/span> pxConstList <span class=\"token punctuation\">)<\/span><span class=\"token operator\">-&gt;<\/span>pxIndex<span class=\"token operator\">-&gt;<\/span>pvOwner<span class=\"token punctuation\">;<\/span>                                         \\\\<br \/>\n    <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span> <span class=\"token number\">0<\/span> <span class=\"token punctuation\">)<\/span><\/p>\n<p>InsertEnd \u51fd\u6570\u5b58\u5728\u7684\u542b\u4e49\u662f&#xff1a;<\/p>\n<p>\u5e76\u4e0d\u662f\u628a\u5f53\u524d\u8981\u63d2\u5165\u7684\u9879\u63d2\u5230\u5217\u8868\u5c3e \u800c\u662f\u8981\u628a\u5217\u8868\u653e\u5728\u904d\u5386\u65f6\u6700\u540e\u4e00\u4e2a\u904d\u5386\u7684\u4f4d\u7f6e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb332\u6b21\uff0c\u70b9\u8d5e6\u6b21\uff0c\u6536\u85cf3\u6b21\u3002\u6839\u636eb\u7ad9up\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[149,371,305],"topic":[],"class_list":["post-38983","post","type-post","status-publish","format-standard","hentry","category-server","tag-windows","tag-371","tag-305"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>FreeRTOS\u5b66\u4e60\u7b14\u8bb0\u301011\u3011-\u4efb\u52a1\u5217\u8868 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/38983.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FreeRTOS\u5b66\u4e60\u7b14\u8bb0\u301011\u3011-\u4efb\u52a1\u5217\u8868 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb332\u6b21\uff0c\u70b9\u8d5e6\u6b21\uff0c\u6536\u85cf3\u6b21\u3002\u6839\u636eb\u7ad9up\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/38983.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-21T14:03:37+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/38983.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/38983.html\",\"name\":\"FreeRTOS\u5b66\u4e60\u7b14\u8bb0\u301011\u3011-\u4efb\u52a1\u5217\u8868 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-05-21T14:03:37+00:00\",\"dateModified\":\"2025-05-21T14:03:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/38983.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/38983.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/38983.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FreeRTOS\u5b66\u4e60\u7b14\u8bb0\u301011\u3011-----\u4efb\u52a1\u5217\u8868\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"FreeRTOS\u5b66\u4e60\u7b14\u8bb0\u301011\u3011-\u4efb\u52a1\u5217\u8868 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/38983.html","og_locale":"zh_CN","og_type":"article","og_title":"FreeRTOS\u5b66\u4e60\u7b14\u8bb0\u301011\u3011-\u4efb\u52a1\u5217\u8868 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb332\u6b21\uff0c\u70b9\u8d5e6\u6b21\uff0c\u6536\u85cf3\u6b21\u3002\u6839\u636eb\u7ad9up\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/38983.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-05-21T14:03:37+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/38983.html","url":"https:\/\/www.wsisp.com\/helps\/38983.html","name":"FreeRTOS\u5b66\u4e60\u7b14\u8bb0\u301011\u3011-\u4efb\u52a1\u5217\u8868 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-05-21T14:03:37+00:00","dateModified":"2025-05-21T14:03:37+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/38983.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/38983.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/38983.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"FreeRTOS\u5b66\u4e60\u7b14\u8bb0\u301011\u3011-----\u4efb\u52a1\u5217\u8868"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/38983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=38983"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/38983\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=38983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=38983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=38983"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=38983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}