Thread: fix rtx thread type

pull/7364/head
Martin Kojtal 2018-06-28 14:26:52 +01:00
parent 1188f4a0b9
commit e91ab9c1a1
1 changed files with 3 additions and 3 deletions

View File

@ -274,7 +274,7 @@ uint32_t Thread::free_stack() {
#if defined(MBED_OS_BACKEND_RTX5)
if (_tid != NULL) {
os_thread_t *thread = (os_thread_t *)_tid;
mbed_rtos_storage_thread_t *thread = (mbed_rtos_storage_thread_t *)_tid;
size = (uint32_t)thread->sp - (uint32_t)thread->stack_mem;
}
#endif
@ -289,7 +289,7 @@ uint32_t Thread::used_stack() {
#if defined(MBED_OS_BACKEND_RTX5)
if (_tid != NULL) {
os_thread_t *thread = (os_thread_t *)_tid;
mbed_rtos_storage_thread_t *thread = (mbed_rtos_storage_thread_t *)_tid;
size = ((uint32_t)thread->stack_mem + thread->stack_size) - thread->sp;
}
#endif
@ -304,7 +304,7 @@ uint32_t Thread::max_stack() {
if (_tid != NULL) {
#if defined(MBED_OS_BACKEND_RTX5)
os_thread_t *thread = (os_thread_t *)_tid;
mbed_rtos_storage_thread_t *thread = (mbed_rtos_storage_thread_t *)_tid;
uint32_t high_mark = 0;
while (((uint32_t *)(thread->stack_mem))[high_mark] == 0xE25A2EA5)
high_mark++;