RTOS: Thread: Fix how free stack is calculated

pull/4620/head
Bartek Szatkowski 2017-06-21 14:30:21 +01:00
parent 505beb773f
commit 4c489e686b
1 changed files with 1 additions and 1 deletions

View File

@ -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();