Revision c5cd2fe4
core/src/aos_thread.c | ||
---|---|---|
94 | 94 |
size_t util; |
95 | 95 |
uint8_t* ptr = (uint8_t*)thread->wabase; |
96 | 96 |
|
97 |
chSysLock(); |
|
98 | 97 |
while (*ptr == CH_DBG_STACK_FILL_VALUE && ptr < (uint8_t*)thread->wabase + aosThdGetStacksize(thread)) { |
99 | 98 |
++ptr; |
100 | 99 |
} |
101 | 100 |
util = aosThdGetStacksize(thread) - (ptr - (uint8_t*)thread->wabase); |
102 |
chSysUnlock(); |
|
103 | 101 |
|
104 | 102 |
return util; |
105 | 103 |
} |
Also available in: Unified diff