<?xml version="1.0"?>\r
<Workspace>\r
<ConfigDictionary>\r
- <CurrentConfigs>\r
- <Project>RTOSDemo/Debug</Project>\r
- </CurrentConfigs>\r
+ <CurrentConfigs />\r
</ConfigDictionary>\r
<Desktop>\r
<Static>\r
<ColumnWidth0>26</ColumnWidth0>\r
<ColumnWidth1>3389</ColumnWidth1>\r
<FilterLevel>2</FilterLevel>\r
- <LiveFile></LiveFile>\r
+ <LiveFile />\r
<LiveLogEnabled>0</LiveLogEnabled>\r
<LiveFilterLevel>-1</LiveFilterLevel>\r
</IarPane-34056>\r
<Column2>30</Column2>\r
<Column3>30</Column3>\r
</ColumnWidths>\r
- <NodeDict>\r
- <ExpandedNode>RTOSDemo</ExpandedNode>\r
- </NodeDict>\r
+ <NodeDict />\r
</IarPane-34063>\r
<ControlBarVersion>\r
<Major>14</Major>\r
<RecentlyUsedMenus>1</RecentlyUsedMenus>\r
<MenuShadows>1</MenuShadows>\r
<ShowAllMenusAfterDelay>1</ShowAllMenusAfterDelay>\r
- <CommandsUsage>1F000000110000DA000001000000108600000100000005B00000010000000F810000010000001BB000000100000004B000000100000001B00000010000001A860000010000000E8100001E000000058100000100000055860000010000001AB000000100000011860000010000004681000001000000608600000100000000B00000010000000886000001000000</CommandsUsage>\r
+ <CommandsUsage>20000000120000DA000001000000108600000100000005B00000010000000F810000010000001BB0000001000000148100000100000004B000000100000001B00000010000001A860000010000000E8100001E000000058100000100000055860000010000001AB000000100000011860000010000004681000001000000608600000100000000B00000010000000886000001000000</CommandsUsage>\r
</MFCToolBarParameters>\r
<CommandManager>\r
<CommandsWithoutImages>30000D8400000F84000008840000FFFFFFFF54840000328100001C81000009840000D484000020F1000010F0000000F0000020F0000030F0000060F0000000880000018800000288000003880000048800000588000008800000098000000A8000000B8000000C800000158000000A81000001E80000D6840000D7840000D8840000D9840000DA840000DB840000DC840000DD840000DE840000DF840000E0840000E1840000E2840000EA840000248100000C840000338400007884000011840000</CommandsWithoutImages>\r
- <MenuUserImages>0C0004840000470000000481000016000000268100002700000009810000180000000684000049000000308400004C0000000E8400004A0000000B81000019000000058100001700000035E100003E00000002E10000310000000D8100001B000000</MenuUserImages>\r
+ <MenuUserImages>1A000484000047000000158100001C0000000481000016000000268100002700000007E100003200000004E100003000000001E100002D0000000D8000000E00000009810000180000000684000049000000178100001E000000148100001B0000000081000010000000308400004C0000000E8400004A00000003E100002F00000000E100002C0000000B8100001900000041E100003C000000168100001D000000058100001700000005E1000031000000518400004D00000035E100003E00000002E100002E0000000D8100001B000000</MenuUserImages>\r
</CommandManager>\r
<Pane-59393>\r
<ID>0</ID>\r
<RectRecentFloat>0A0000000A0000006E0000006E000000</RectRecentFloat>\r
- <RectRecentDocked>0000000054050000700D000067050000</RectRecentDocked>\r
+ <RectRecentDocked>0000000058050000700D00006B050000</RectRecentDocked>\r
<RecentFrameAlignment>4096</RecentFrameAlignment>\r
<RecentRowIndex>0</RecentRowIndex>\r
<IsFloating>0</IsFloating>\r
</BasePane-59393>\r
<Pane--1>\r
<ID>4294967295</ID>\r
- <RectRecentFloat>00000000490000001A0100003F040000</RectRecentFloat>\r
- <RectRecentDocked>00000000320000001A01000028040000</RectRecentDocked>\r
+ <RectRecentFloat>00000000490000001A01000042040000</RectRecentFloat>\r
+ <RectRecentDocked>00000000320000001A0100002C040000</RectRecentDocked>\r
<RecentFrameAlignment>4096</RecentFrameAlignment>\r
<RecentRowIndex>0</RecentRowIndex>\r
<IsFloating>0</IsFloating>\r
<Pane-34051>\r
<ID>34051</ID>\r
<RectRecentFloat>00000000220000003801000004010000</RectRecentFloat>\r
- <RectRecentDocked>04000000440400006C0D00003A050000</RectRecentDocked>\r
+ <RectRecentDocked>04000000480400006C0D00003E050000</RectRecentDocked>\r
<RecentFrameAlignment>4096</RecentFrameAlignment>\r
<RecentRowIndex>0</RecentRowIndex>\r
<IsFloating>0</IsFloating>\r
<Pane-34057>\r
<ID>34057</ID>\r
<RectRecentFloat>00000000220000003801000004010000</RectRecentFloat>\r
- <RectRecentDocked>04000000440400006C0D00003A050000</RectRecentDocked>\r
+ <RectRecentDocked>04000000480400006C0D00003E050000</RectRecentDocked>\r
<RecentFrameAlignment>4096</RecentFrameAlignment>\r
<RecentRowIndex>0</RecentRowIndex>\r
<IsFloating>0</IsFloating>\r
<ColumnWidth1>171</ColumnWidth1>\r
<ColumnWidth2>2054</ColumnWidth2>\r
<FilterLevel>2</FilterLevel>\r
- <LiveFile></LiveFile>\r
+ <LiveFile />\r
<LiveLogEnabled>0</LiveLogEnabled>\r
<LiveFilterLevel>-1</LiveFilterLevel>\r
</IarPane-34057>\r
<Pane-34058>\r
<ID>34058</ID>\r
<RectRecentFloat>00000000220000003801000004010000</RectRecentFloat>\r
- <RectRecentDocked>04000000440400006C0D00003A050000</RectRecentDocked>\r
+ <RectRecentDocked>0400000048040000FC0900003E050000</RectRecentDocked>\r
<RecentFrameAlignment>4096</RecentFrameAlignment>\r
<RecentRowIndex>0</RecentRowIndex>\r
<IsFloating>0</IsFloating>\r
<Pane-34059>\r
<ID>34059</ID>\r
<RectRecentFloat>00000000220000003801000004010000</RectRecentFloat>\r
- <RectRecentDocked>04000000440400006C0D00003A050000</RectRecentDocked>\r
+ <RectRecentDocked>0400000048040000FC0900003E050000</RectRecentDocked>\r
<RecentFrameAlignment>4096</RecentFrameAlignment>\r
<RecentRowIndex>0</RecentRowIndex>\r
<IsFloating>0</IsFloating>\r
<Pane-34060>\r
<ID>34060</ID>\r
<RectRecentFloat>00000000220000003801000004010000</RectRecentFloat>\r
- <RectRecentDocked>04000000440400006C0D00003A050000</RectRecentDocked>\r
+ <RectRecentDocked>0400000048040000FC0900003E050000</RectRecentDocked>\r
<RecentFrameAlignment>4096</RecentFrameAlignment>\r
<RecentRowIndex>0</RecentRowIndex>\r
<IsFloating>0</IsFloating>\r
<Pane-34062>\r
<ID>34062</ID>\r
<RectRecentFloat>00000000220000003801000004010000</RectRecentFloat>\r
- <RectRecentDocked>04000000440400006C0D00003A050000</RectRecentDocked>\r
+ <RectRecentDocked>0400000048040000FC0900003E050000</RectRecentDocked>\r
<RecentFrameAlignment>4096</RecentFrameAlignment>\r
<RecentRowIndex>0</RecentRowIndex>\r
<IsFloating>0</IsFloating>\r
<Pane-34063>\r
<ID>34063</ID>\r
<RectRecentFloat>00000000220000001A010000E0010000</RectRecentFloat>\r
- <RectRecentDocked>00000000460000001A01000028040000</RectRecentDocked>\r
+ <RectRecentDocked>00000000460000001A0100002C040000</RectRecentDocked>\r
<RecentFrameAlignment>4096</RecentFrameAlignment>\r
<RecentRowIndex>0</RecentRowIndex>\r
<IsFloating>0</IsFloating>\r
<IsVisible>1</IsVisible>\r
</BasePane-34063>\r
<DockingManager-256>\r
- <DockingPaneAndPaneDividers>000000000E000000000000000010000001000000FFFFFFFFFFFFFFFF1A010000320000001E01000028040000010000000200001004000000010000000000000000000000FFFFFFFF010000000F850000FFFF02000B004354616262656450616E65001000000100000000000000490000001A0100003F04000000000000320000001A01000028040000000000004010005601000000FFFEFF0957006F0072006B0073007000610063006500010000000F85000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFF0F85000001000000FFFFFFFF0F850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000078500000000000000000000000000000000000001000000078500000100000007850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000048500000000000000000000000000000000000001000000048500000100000004850000000000000080000001000000FFFFFFFFFFFFFFFF0000000028040000700D00002C04000001000000010000100400000001000000AAFDFFFF45000000FFFFFFFF0600000003850000098500000A8500000B8500000C8500000E850000018000800000010000000000000043040000700D00006B050000000000002C040000700D000054050000000000004080005606000000FFFEFF054200750069006C006400010000000385000001000000FFFFFFFFFFFFFFFFFFFEFF0C4400650063006C00610072006100740069006F006E007300010000000985000001000000FFFFFFFFFFFFFFFFFFFEFF0A5200650066006500720065006E00630065007300000000000A85000001000000FFFFFFFFFFFFFFFFFFFEFF0D460069006E006400200069006E002000460069006C0065007300000000000B85000001000000FFFFFFFFFFFFFFFFFFFEFF1541006D0062006900670075006F0075007300200044006500660069006E006900740069006F006E007300000000000C85000001000000FFFFFFFFFFFFFFFFFFFEFF0B54006F006F006C0020004F0075007400700075007400000000000E85000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFF0385000001000000FFFFFFFF03850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000138500000000000000000000000000000000000001000000138500000100000013850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000128500000000000000000000000000000000000001000000128500000100000012850000000000000080000000000000FFFFFFFFFFFFFFFF000000009F040000700D0000A3040000000000000100000004000000010000000000000000000000FFFFFFFF0200000002850000088500000180008000000000000000000000BA040000700D00006B05000000000000A3040000700D000054050000000000004080004602000000FFFEFF0B42007200650061006B0070006F0069006E0074007300000000000285000001000000FFFFFFFFFFFFFFFFFFFEFF094400650062007500670020004C006F006700000000000885000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFF0285000001000000FFFFFFFF0285000001000000FFFF02001200434D756C746950616E654672616D65576E64000100840000000022000000380100000401000000000000000000000200000000000000068500000000000000000000000000000000000001000000068500000000000000000000</DockingPaneAndPaneDividers>\r
+ <DockingPaneAndPaneDividers>000000000C000000000000000010000001000000FFFFFFFFFFFFFFFF1A010000320000001E0100002C040000010000000200001004000000010000000000000000000000FFFFFFFF010000000F850000FFFF02000B004354616262656450616E65001000000100000000000000490000001A0100004204000000000000320000001A0100002C040000000000004010005601000000FFFEFF0957006F0072006B0073007000610063006500010000000F85000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFF0F85000001000000FFFFFFFF0F850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000078500000000000000000000000000000000000001000000078500000100000007850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000048500000000000000000000000000000000000001000000048500000100000004850000000000000080000001000000FFFFFFFFFFFFFFFF000000002C040000700D00003004000001000000010000100400000001000000AAFDFFFF45000000FFFFFFFF0600000003850000098500000A8500000B8500000C8500000E850000018000800000010000000000000046040000000A00006E0500000000000030040000700D000058050000000000004080005606000000FFFEFF054200750069006C006400010000000385000001000000FFFFFFFFFFFFFFFFFFFEFF0C4400650063006C00610072006100740069006F006E007300010000000985000001000000FFFFFFFFFFFFFFFFFFFEFF0A5200650066006500720065006E00630065007300000000000A85000001000000FFFFFFFFFFFFFFFFFFFEFF0D460069006E006400200069006E002000460069006C0065007300000000000B85000001000000FFFFFFFFFFFFFFFFFFFEFF1541006D0062006900670075006F0075007300200044006500660069006E006900740069006F006E007300000000000C85000001000000FFFFFFFFFFFFFFFFFFFEFF0B54006F006F006C0020004F0075007400700075007400000000000E85000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFF0385000001000000FFFFFFFF03850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000138500000000000000000000000000000000000001000000138500000100000013850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000128500000000000000000000000000000000000001000000128500000100000012850000000000000000000000000000</DockingPaneAndPaneDividers>\r
</DockingManager-256>\r
<MFCToolBar-34048>\r
<Name>CMSIS-Pack</Name>\r
</Desktop>\r
<MDIWindows>\r
<MDIClientArea-0>\r
- <MDITabsState>010000000300000001000000000000000000000001000000010000000200000000000000010000000100000000000000280000002800000001000000050000000000000001000000FFFEFF0F2400570053005F0044004900520024005C006D00610069006E002E00630001000000FFFF010014004966436F6E74656E7453746F72616765496D706CFFFEFF00FFFEFFFF22013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E003100370038003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E0030003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E0030003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF066D00610069006E002E00630000000000FFFFFFFFFFFFFFFFFFFEFF312400570053005F0044004900520024005C002E002E005C002E002E005C0053006F0075007200630065005C0070006F0072007400610062006C0065005C004900410052005C00410052004D005F0043004D0033005C0070006F00720074002E006300010000000180FFFEFF00FFFEFFFF20013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E0030003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E0030003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E0030003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF0670006F00720074002E00630000000000FFFFFFFFFFFFFFFFFFFEFF252400570053005F0044004900520024005C002E002E005C002E002E005C0053006F0075007200630065005C00730074007200650061006D005F006200750066006600650072002E006300010000000180FFFEFF00FFFEFFFF2A013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E003500300034003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E00310039003500380032003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E00310039003500380032003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF0F730074007200650061006D005F006200750066006600650072002E00630000000000FFFFFFFFFFFFFFFFFFFEFF342400570053005F0044004900520024005C002E002E005C002E002E005C0053006F0075007200630065005C0070006F0072007400610062006C0065005C004900410052005C00410052004D005F0043004D0033005C0070006F0072007400610073006D002E007300010000000180FFFEFF00FFFEFFFF27013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E00330036003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E0031003500390035003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E0031003500390035003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF0970006F0072007400610073006D002E00730000000000FFFFFFFFFFFFFFFFFFFEFF1D2400570053005F0044004900520024005C002E002E005C002E002E005C0053006F0075007200630065005C007400610073006B0073002E006300010000000180FFFEFF00FFFEFFFF2D013C003F0078006D006C002000760065007200730069006F006E003D00220031002E0030002200200065006E0063006F00640069006E0067003D0022005500540046002D00380022003F003E000A003C0052006F006F0074003E000A0020002000200020003C004E0075006D0052006F00770073003E0031003C002F004E0075006D0052006F00770073003E000A0020002000200020003C004E0075006D0043006F006C0073003E0031003C002F004E0075006D0043006F006C0073003E000A0020002000200020003C00580050006F0073003E0030003C002F00580050006F0073003E000A0020002000200020003C00590050006F0073003E0030003C002F00590050006F0073003E000A0020002000200020003C00530065006C00530074006100720074003E0030003C002F00530065006C00530074006100720074003E000A0020002000200020003C00530065006C0045006E0064003E0030003C002F00530065006C0045006E0064003E000A0020002000200020003C00580050006F00730032003E0030003C002F00580050006F00730032003E000A0020002000200020003C00590050006F00730032003E0035003100330030003C002F00590050006F00730032003E000A0020002000200020003C00530065006C005300740061007200740032003E003100370034003200310038003C002F00530065006C005300740061007200740032003E000A0020002000200020003C00530065006C0045006E00640032003E003100370034003200310038003C002F00530065006C0045006E00640032003E000A003C002F0052006F006F0074003E000A00FFFEFF077400610073006B0073002E00630000000000FFFFFFFFFFFFFFFF0000000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD5000100000001000000020000001E01000049000000700D00003F040000</MDITabsState>\r
+ <MDITabsState>010000000300000001000000000000000000000001000000010000000200000000000000010000000100000000000000280000002800000000000000</MDITabsState>\r
</MDIClientArea-0>\r
</MDIWindows>\r
</WindowStorage>\r
static void prvTestAbortingQueueSend( void );\r
static void prvTestAbortingStreamBufferReceive( void );\r
\r
+/*\r
+ * Performs a few tests to cover code paths not otherwise covered by the continuous\r
+ * tests.\r
+ */\r
+static void prvPerformSingleTaskTests( void );\r
+\r
/*\r
* Checks the amount of time a task spent in the Blocked state is within the\r
* expected bounds.\r
TickType_t xTimeAtStart;\r
const TickType_t xStartMargin = 2UL;\r
\r
+/* Used to control whether to use xTaskAbortDelay() or xTaskAbortDelayFromISR() so\r
+both are used with all the tests. */\r
+BaseType_t xUseFromISRVersion = pdFALSE, xHigherPriorityTaskWoken;\r
+\r
/* Just to remove compiler warnings. */\r
( void ) pvParameters;\r
\r
raise the priority of the controlling task to that of the blocking\r
task to minimise discrepancies. */\r
vTaskPrioritySet( NULL, abtBLOCKING_PRIORITY );\r
+\r
vTaskDelay( xMaxBlockTime + xHalfMaxBlockTime + xStartMargin );\r
- if( xTaskAbortDelay( xBlockingTask ) != pdPASS )\r
+\r
+ /* For test coverage sometimes xTaskAbortDelay() is used and sometimes\r
+ xTaskAbortDelayFromISR() is used. */\r
+ if( xUseFromISRVersion == pdFALSE )\r
{\r
- xErrorOccurred = pdTRUE;\r
+ if( xTaskAbortDelay( xBlockingTask ) != pdPASS )\r
+ {\r
+ xErrorOccurred = pdTRUE;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ xHigherPriorityTaskWoken = pdFALSE;\r
+\r
+ /* For test coverage, sometimes xHigherPriorityTaskWoken is used, and\r
+ sometimes NULL is used. */\r
+\r
+ if( ( xControllingCycles % 2 ) == 0 )\r
+ {\r
+ if( xTaskAbortDelayFromISR( xBlockingTask, &xHigherPriorityTaskWoken ) != pdPASS )\r
+ {\r
+ xErrorOccurred = pdTRUE;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if( xTaskAbortDelayFromISR( xBlockingTask, NULL ) != pdPASS )\r
+ {\r
+ xErrorOccurred = pdTRUE;\r
+ }\r
+ }\r
+\r
+ /* The tasks have the same priority so xHigherPriorityTaskWoken should\r
+ never get set. */\r
+ if( xHigherPriorityTaskWoken != pdFALSE )\r
+ {\r
+ xErrorOccurred = pdTRUE;\r
+ }\r
}\r
\r
/* Reset the priority to the normal controlling priority. */\r
\r
/* To indicate this task is still executing. */\r
xControllingCycles++;\r
+\r
+ if( ( xControllingCycles % abtMAX_TESTS ) == 0 )\r
+ {\r
+ /* Looped through all the tests. Switch between using xTaskAbortDelay()\r
+ and xTaskAbortDelayFromISR() for the next round of tests. */\r
+ xUseFromISRVersion = !xUseFromISRVersion;\r
+ }\r
}\r
}\r
/*-----------------------------------------------------------*/\r
/* Just to remove compiler warnings. */\r
( void ) pvParameters;\r
\r
+ /* Start by performing a few tests to cover code not exercised in the loops\r
+ below. */\r
+ prvPerformSingleTaskTests();\r
+\r
xControllingTask = xTaskGetHandle( pcControllingTaskName );\r
configASSERT( xControllingTask );\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
+static void prvPerformSingleTaskTests( void )\r
+{\r
+TaskHandle_t xThisTask;\r
+BaseType_t xReturned;\r
+\r
+ /* Try unblocking this task using both the task and ISR versions of the API -\r
+ both should return false as this task is not blocked. */\r
+ xThisTask = xTaskGetCurrentTaskHandle();\r
+\r
+ xReturned = xTaskAbortDelay( xThisTask );\r
+ if( xReturned != pdFALSE )\r
+ {\r
+ xErrorOccurred = pdTRUE;\r
+ }\r
+\r
+ xReturned = xTaskAbortDelayFromISR( xThisTask, NULL );\r
+ if( xReturned != pdFALSE )\r
+ {\r
+ xErrorOccurred = pdTRUE;\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
static void prvTestAbortingTaskDelayUntil( void )\r
{\r
TickType_t xTimeAtStart, xLastBlockTime;\r
#endif\r
\r
#define notifyTASK_PRIORITY ( tskIDLE_PRIORITY )\r
-#define notifyUINT32_MAX ( ( uint32_t ) 0xffffffff )\r
+\r
+/* Constants used in tests when setting/clearing bits. */\r
+#define notifyUINT32_MAX ( ( uint32_t ) 0xffffffff )\r
+#define notifyUINT32_HIGH_BYTE ( ( uint32_t ) 0xff000000 )\r
+#define notifyUINT32_LOW_BYTE ( ( uint32_t ) 0x000000ff )\r
+\r
#define notifySUSPENDED_TEST_TIMER_PERIOD pdMS_TO_TICKS( 50 )\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
\r
+ /* ------------------------------------------------------------------------\r
+ Clear bits in the notification value. */\r
+\r
+ /* Get the task to set all bits its own notification value. This is not a\r
+ normal thing to do, and is only done here for test purposes. */\r
+ xTaskNotify( xTaskToNotify, notifyUINT32_MAX, eSetBits );\r
+\r
+ /* Now clear the top bytes - the returned value from the first call should\r
+ indicate that previously all bits were set. */\r
+ configASSERT( ulTaskNotifyValueClear( xTaskToNotify, notifyUINT32_HIGH_BYTE ) == notifyUINT32_MAX );\r
+\r
+ /* Next clear the bottom bytes - the returned value this time should indicate\r
+ that the top byte was clear (before the bottom byte was cleared. */\r
+ configASSERT( ulTaskNotifyValueClear( xTaskToNotify, notifyUINT32_LOW_BYTE ) == ( notifyUINT32_MAX & ~notifyUINT32_HIGH_BYTE ) );\r
+\r
+ /* Next clear all bytes - the returned value should indicate that previously the\r
+ high and low bytes were clear. */\r
+ configASSERT( ulTaskNotifyValueClear( xTaskToNotify, notifyUINT32_MAX ) == ( notifyUINT32_MAX & ~notifyUINT32_HIGH_BYTE & ~notifyUINT32_LOW_BYTE ) );\r
+\r
+ /* Now all bits should be clear. */\r
+ configASSERT( ulTaskNotifyValueClear( xTaskToNotify, notifyUINT32_MAX ) == 0 );\r
+ configASSERT( ulTaskNotifyValueClear( xTaskToNotify, 0UL ) == 0 );\r
+ configASSERT( ulTaskNotifyValueClear( xTaskToNotify, notifyUINT32_MAX ) == 0 );\r
+\r
+ /* Now the notification state should be eNotified, so it should now be\r
+ possible to clear the notification state. */\r
+ configASSERT( xTaskNotifyStateClear( NULL ) == pdTRUE );\r
+ configASSERT( xTaskNotifyStateClear( NULL ) == pdFALSE );\r
+\r
+\r
+\r
/* ------------------------------------------------------------------------\r
Create a timer that will try notifying this task while it is suspended. */\r
xSingleTaskTimer = xTimerCreate( "SingleNotify", notifySUSPENDED_TEST_TIMER_PERIOD, pdFALSE, NULL, prvSuspendedTaskTimerTestCallback );\r
the variable xPendingTicks.\r
+ Correct alignment of stack top in RISC-V port when\r
configISR_STACK_SIZE_WORDS is defined to a non zero value.\r
+ + RISC-V port updates: The machine timer compare register can now be for\r
+ any HART, and correct the sequence used to update the 64-bit machine timer\r
+ compare register on 32-bit cores.\r
+ + Update Keil projects that use the MPU so memory regions come from linker\r
+ script (scatter file) variables instead of being hard coded.\r
+ + Added tickless low power modes into the ARM, IAR and GCC Cortex-M0 compiler\r
+ ports.\r
+ + Updated the behaviour of the ARMv7-M MPU (Memory Protection Unit) ports to\r
+ match that of the ARMv8-M ports whereby privilege escalations can only\r
+ originate from within the kernel's own memory segment.\r
+ + Added LPC51U68 Cortex-M0+ port for GCC (MCUXpresso), Keil and IAR\r
+ compilers.\r
+ + Added CORTEX_MPU_STM32L4_Discovery_Keil_STM32Cube demo.\r
+ + Added xTaskAbortDelayFromISR() API function.\r
+ + Added xTaskNotifyValueClear() API function.\r
\r
\r
Changes between FreeRTOS V10.2.1 and FreeRTOS V10.2.0 released May 13 2019:\r
Windows port.\r
+ Update the PIC32 port to remove deprecation warnings output by the latest\r
XC32 compilers.\r
+ + Fix bug when xQueueOverwrite() and xQueueOverwrite() from ISR are used to\r
+ overwrite items in two queues that are part of the same set.\r
\r
Demo application updates:\r
\r
BaseType_t MPU_xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;\r
uint32_t MPU_ulTaskNotifyTake( BaseType_t xClearCountOnExit, TickType_t xTicksToWait ) FREERTOS_SYSTEM_CALL;\r
BaseType_t MPU_xTaskNotifyStateClear( TaskHandle_t xTask ) FREERTOS_SYSTEM_CALL;\r
+uint32_t MPU_ulTaskNotifyValueClear( TaskHandle_t xTask, uint32_t ulBitsToClear ) FREERTOS_SYSTEM_CALL;\r
BaseType_t MPU_xTaskIncrementTick( void ) FREERTOS_SYSTEM_CALL;\r
TaskHandle_t MPU_xTaskGetCurrentTaskHandle( void ) FREERTOS_SYSTEM_CALL;\r
void MPU_vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) FREERTOS_SYSTEM_CALL;\r
#define xTaskNotifyWait MPU_xTaskNotifyWait\r
#define ulTaskNotifyTake MPU_ulTaskNotifyTake\r
#define xTaskNotifyStateClear MPU_xTaskNotifyStateClear\r
+ #define ulTaskNotifyValueClear MPU_ulTaskNotifyValueClear\r
#define xTaskCatchUpTicks MPU_xTaskCatchUpTicks\r
\r
#define xTaskGetCurrentTaskHandle MPU_xTaskGetCurrentTaskHandle\r
*/\r
BaseType_t xTaskAbortDelay( TaskHandle_t xTask ) PRIVILEGED_FUNCTION;\r
\r
+/**\r
+* task. h\r
+* <pre>BaseType_t xTaskAbortDelayFromISR( TaskHandle_t xTask, BaseType_t * const pxHigherPriorityTaskWoken )</pre>\r
+*\r
+* INCLUDE_xTaskAbortDelay must be defined as 1 in FreeRTOSConfig.h for this\r
+* function to be available.\r
+*\r
+* A version of xTaskAbortDelay() that can be used from an interrupt service routine.\r
+*\r
+* A task will enter the Blocked state when it is waiting for an event. The\r
+* event it is waiting for can be a temporal event (waiting for a time), such\r
+* as when vTaskDelay() is called, or an event on an object, such as when\r
+* xQueueReceive() or ulTaskNotifyTake() is called. If the handle of a task\r
+* that is in the Blocked state is used in a call to xTaskAbortDelay() then the\r
+* task will leave the Blocked state, and return from whichever function call\r
+* placed the task into the Blocked state.\r
+*\r
+* @param xTask The handle of the task to remove from the Blocked state.\r
+*\r
+* @param pxHigherPriorityTaskWoken xTaskAbortDelayFromISR() will set\r
+* *pxHigherPriorityTaskWoken to pdTRUE if a task was removed from the Blocked state,\r
+* and the task that was removed from the Blocked state has a priority higher than the\r
+* currently running task. If xTaskAbortDelayFromISR() sets this value to pdTRUE then\r
+* a context switch should be requested before the interrupt is exited.\r
+*\r
+* @return If the task referenced by xTask was not in the Blocked state then\r
+* pdFAIL is returned. Otherwise pdPASS is returned.\r
+*\r
+* \defgroup xTaskAbortDelay xTaskAbortDelayFromISR\r
+* \ingroup TaskCtrl\r
+*/\r
+BaseType_t xTaskAbortDelayFromISR( TaskHandle_t xTask, BaseType_t * const pxHigherPriorityTaskWoken ) PRIVILEGED_FUNCTION;\r
+\r
/**\r
* task. h\r
* <pre>UBaseType_t uxTaskPriorityGet( const TaskHandle_t xTask );</pre>\r
*/\r
BaseType_t xTaskNotifyStateClear( TaskHandle_t xTask );\r
\r
+/**\r
+* task. h\r
+* <PRE>uint32_t ulTaskNotifyValueClear( TaskHandle_t xTask, uint32_t ulBitsToClear );</pre>\r
+*\r
+* Clears the bits specified by the ulBitsToClear bit mask in the notification\r
+* value of the task referenced by xTask.\r
+*\r
+* Set ulBitsToClear to to 0xffffffff (UINT_MAX on 32-bit architectures) to clear\r
+* the notification value to 0. Set ulBitsToClear to 0 to query the task's\r
+* notification value without clearing any bits.\r
+*\r
+* @return The value of the target task's notification value before the bits\r
+* specified by ulBitsToClear were cleared.\r
+* \defgroup ulTaskNotifyValueClear ulTaskNotifyValueClear\r
+* \ingroup TaskNotifications\r
+*/\r
+uint32_t ulTaskNotifyValueClear( TaskHandle_t xTask, uint32_t ulBitsToClear ) PRIVILEGED_FUNCTION;\r
+\r
/**\r
* task.h\r
* <pre>void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut )</pre>\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
+#if( configUSE_TASK_NOTIFICATIONS == 1 )\r
+ uint32_t MPU_ulTaskNotifyValueClear( TaskHandle_t xTask, uint32_t ulBitsToClear ) /* FREERTOS_SYSTEM_CALL */\r
+ {\r
+ uint32_t ulReturn;\r
+ BaseType_t xRunningPrivileged = xPortRaisePrivilege();\r
+\r
+ ulReturn = ulTaskNotifyValueClear( xTask, ulBitsToClear );\r
+ vPortResetPrivilege( xRunningPrivileged );\r
+ return ulReturn;\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
QueueHandle_t MPU_xQueueGenericCreate( UBaseType_t uxQueueLength, UBaseType_t uxItemSize, uint8_t ucQueueType ) /* FREERTOS_SYSTEM_CALL */\r
{\r
relies on xPendedTicks being wound down to 0 in xTaskResumeAll(). */\r
configASSERT( uxSchedulerSuspended == 0 );\r
\r
- /* Use xPendedTicks to mimic xTicksToCatchUp number of ticks occuring when\r
+ /* Use xPendedTicks to mimic xTicksToCatchUp number of ticks occurring when\r
the scheduler is suspended so the ticks are executed in xTaskResumeAll(). */\r
vTaskSuspendAll();\r
xPendedTicks += xTicksToCatchUp;\r
}\r
/*----------------------------------------------------------*/\r
\r
+#if ( INCLUDE_xTaskAbortDelay == 1 )\r
+\r
+ BaseType_t xTaskAbortDelayFromISR( TaskHandle_t xTask, BaseType_t * const pxHigherPriorityTaskWoken )\r
+ {\r
+ TCB_t *pxTCB = xTask;\r
+ BaseType_t xReturn;\r
+ UBaseType_t uxSavedInterruptStatus;\r
+\r
+ configASSERT( pxTCB );\r
+\r
+ /* RTOS ports that support interrupt nesting have the concept of a maximum\r
+ system call (or maximum API call) interrupt priority. Interrupts that are\r
+ above the maximum system call priority are kept permanently enabled, even\r
+ when the RTOS kernel is in a critical section, but cannot make any calls to\r
+ FreeRTOS API functions. If configASSERT() is defined in FreeRTOSConfig.h\r
+ then portASSERT_IF_INTERRUPT_PRIORITY_INVALID() will result in an assertion\r
+ failure if a FreeRTOS API function is called from an interrupt that has been\r
+ assigned a priority above the configured maximum system call priority.\r
+ Only FreeRTOS functions that end in FromISR can be called from interrupts\r
+ that have been assigned a priority at or (logically) below the maximum\r
+ system call interrupt priority. FreeRTOS maintains a separate interrupt\r
+ safe API to ensure interrupt entry is as fast and as simple as possible.\r
+ More information (albeit Cortex-M specific) is provided on the following\r
+ link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */\r
+ portASSERT_IF_INTERRUPT_PRIORITY_INVALID();\r
+\r
+ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();\r
+ {\r
+ /* A task can only be prematurely removed from the Blocked state if\r
+ it is actually in the Blocked state. */\r
+ if( eTaskGetState( xTask ) == eBlocked )\r
+ {\r
+ xReturn = pdPASS;\r
+\r
+ /* Remove the reference to the task from the blocked list. A higher\r
+ priority interrupt won't touch the xStateListItem because of the\r
+ critical section. */\r
+ ( void ) uxListRemove( &( pxTCB->xStateListItem ) );\r
+\r
+ /* Is the task waiting on an event also? If so remove it from\r
+ the event list too. */\r
+ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )\r
+ {\r
+ ( void ) uxListRemove( &( pxTCB->xEventListItem ) );\r
+\r
+ /* This lets the task know it was forcibly removed from the\r
+ blocked state so it should not re-evaluate its block time and\r
+ then block again. */\r
+ pxTCB->ucDelayAborted = pdTRUE;\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+\r
+ /* Place the unblocked task into the appropriate ready list. */\r
+ prvAddTaskToReadyList( pxTCB );\r
+\r
+ if( pxTCB->uxPriority > pxCurrentTCB->uxPriority )\r
+ {\r
+ if( pxHigherPriorityTaskWoken != NULL )\r
+ {\r
+ /* Pend the yield to be performed when the scheduler\r
+ is unsuspended. */\r
+ *pxHigherPriorityTaskWoken = pdTRUE;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ mtCOVERAGE_TEST_MARKER();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ xReturn = pdFAIL;\r
+ }\r
+ }\r
+ portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );\r
+\r
+ return xReturn;\r
+ }\r
+\r
+#endif\r
+/*----------------------------------------------------------*/\r
+\r
#if ( INCLUDE_xTaskAbortDelay == 1 )\r
\r
BaseType_t xTaskAbortDelay( TaskHandle_t xTask )\r
if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL )\r
{\r
( void ) uxListRemove( &( pxTCB->xEventListItem ) );\r
+\r
+ /* This lets the task know it was forcibly removed from the\r
+ blocked state so it should not re-evaluate its block time and\r
+ then block again. */\r
pxTCB->ucDelayAborted = pdTRUE;\r
}\r
else\r
}\r
\r
#endif /* configUSE_TASK_NOTIFICATIONS */\r
-\r
/*-----------------------------------------------------------*/\r
\r
#if( configUSE_TASK_NOTIFICATIONS == 1 )\r
#endif /* configUSE_TASK_NOTIFICATIONS */\r
/*-----------------------------------------------------------*/\r
\r
+#if( configUSE_TASK_NOTIFICATIONS == 1 )\r
+\r
+ uint32_t ulTaskNotifyValueClear( TaskHandle_t xTask, uint32_t ulBitsToClear )\r
+ {\r
+ TCB_t *pxTCB;\r
+ uint32_t ulReturn;\r
+\r
+ /* If null is passed in here then it is the calling task that is having\r
+ its notification state cleared. */\r
+ pxTCB = prvGetTCBFromHandle( xTask );\r
+\r
+ taskENTER_CRITICAL();\r
+ {\r
+ /* Return the notification as it was before the bits were cleared,\r
+ then clear the bit mask. */\r
+ ulReturn = pxCurrentTCB->ulNotifiedValue;\r
+ pxTCB->ulNotifiedValue &= ~ulBitsToClear;\r
+ }\r
+ taskEXIT_CRITICAL();\r
+\r
+ return ulReturn;\r
+ }\r
+\r
+#endif /* configUSE_TASK_NOTIFICATIONS */\r
+/*-----------------------------------------------------------*/\r
+\r
#if( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) )\r
\r
uint32_t ulTaskGetIdleRunTimeCounter( void )\r