mirror of https://github.com/ARMmbed/mbed-os.git
RTOS: Thread: Fix how free stack is calculated
parent
505beb773f
commit
4c489e686b
|
@ -240,7 +240,7 @@ uint32_t Thread::free_stack() {
|
||||||
|
|
||||||
if (_tid != NULL) {
|
if (_tid != NULL) {
|
||||||
os_thread_t *thread = (os_thread_t *)_tid;
|
os_thread_t *thread = (os_thread_t *)_tid;
|
||||||
size = (uint32_t)thread->stack_mem - thread->sp;
|
size = (uint32_t)thread->sp - (uint32_t)thread->stack_mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
_mutex.unlock();
|
_mutex.unlock();
|
||||||
|
|
Loading…
Reference in New Issue