#include <cstdio>
#include <cstdint>

#include "tx_api.h"

#include "utils.h"

void printThreadStackInfo(const char* const TAG)
{
	TX_THREAD* current_thread = tx_thread_identify();

	printf("%s: Stack size: %lu, used: %u, free: %u\n", TAG, current_thread->tx_thread_stack_size,
		  (uint8_t*)current_thread->tx_thread_stack_ptr - (uint8_t*)current_thread->tx_thread_stack_start,
		  (uint8_t*)current_thread->tx_thread_stack_end - (uint8_t*)current_thread->tx_thread_stack_ptr);

}