| Line | |
|---|
| 1 | #include <cstdio>
|
|---|
| 2 | #include <cstdint>
|
|---|
| 3 |
|
|---|
| 4 | #include "tx_api.h"
|
|---|
| 5 |
|
|---|
| 6 | #include "utils.h"
|
|---|
| 7 |
|
|---|
| 8 | void printThreadStackInfo(const char* const TAG)
|
|---|
| 9 | {
|
|---|
| 10 | TX_THREAD* current_thread = tx_thread_identify();
|
|---|
| 11 |
|
|---|
| 12 | printf("%s: Stack size: %lu, used: %u, free: %u\n", TAG, current_thread->tx_thread_stack_size,
|
|---|
| 13 | (uint8_t*)current_thread->tx_thread_stack_ptr - (uint8_t*)current_thread->tx_thread_stack_start,
|
|---|
| 14 | (uint8_t*)current_thread->tx_thread_stack_end - (uint8_t*)current_thread->tx_thread_stack_ptr);
|
|---|
| 15 |
|
|---|
| 16 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.