Skip to content

Commit 9396f43

Browse files
committed
Corrected osThreadGetStackSpace return value (bytes instead of words) #32
1 parent 3eb4c75 commit 9396f43

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

ARM.CMSIS-FreeRTOS.pdsc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<license>License/license.txt</license>
99

1010
<releases>
11+
<release version="10.2.1-dev0">
12+
- Corrected osThreadGetStackSpace return value (bytes instead of words)
13+
</release>
1114
<release version="10.2.0" date="2019-04-12">
1215
FreeRTOS 10.2.0
1316
Maintenance for CMSIS 5.4.0:

CMSIS/RTOS2/FreeRTOS/Source/cmsis_os2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ uint32_t osThreadGetStackSpace (osThreadId_t thread_id) {
522522
if (IS_IRQ() || (hTask == NULL)) {
523523
sz = 0U;
524524
} else {
525-
sz = (uint32_t)uxTaskGetStackHighWaterMark (hTask);
525+
sz = (uint32_t)(uxTaskGetStackHighWaterMark(hTask) * sizeof(StackType_t));
526526
}
527527

528528
return (sz);

DoxyGen/General/src/cmsis_freertos.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ File/Directory |Content
5656
\page cm_revisionHistory Revision History
5757

5858
<table class="cmtable" summary="Revision History">
59+
<tr>
60+
<td>10.2.1</td>
61+
<td>
62+
<ul>
63+
<li>Corrected osThreadGetStackSpace return value (bytes instead of words)</li>
64+
</ul>
65+
</td>
66+
</tr>
5967
<tr>
6068
<td>10.2.0</td>
6169
<td>

0 commit comments

Comments
 (0)