mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-03 03:09:59 +00:00
2874b22d6c
* `Lock`: trivial wrapper for FreeRTOS binary semaphores * `LockGuard`: RAII wrapper for using `Lock` * `printThreadInfo`: helper for showing which core/FreeRTOS task we are running under
21 lines
483 B
C++
21 lines
483 B
C++
#include "debug.h"
|
|
|
|
#include <cstdint>
|
|
|
|
#include <freertos/FreeRTOS.h>
|
|
#include <freertos/task.h>
|
|
|
|
#include "configuration.h"
|
|
|
|
namespace meshtastic
|
|
{
|
|
|
|
void printThreadInfo(const char *extra)
|
|
{
|
|
uint32_t taskHandle = reinterpret_cast<uint32_t>(xTaskGetCurrentTaskHandle());
|
|
DEBUG_MSG("printThreadInfo(%s) task: %" PRIx32 " core id: %u min free stack: %u\n", extra, taskHandle, xPortGetCoreID(),
|
|
uxTaskGetStackHighWaterMark(nullptr));
|
|
}
|
|
|
|
} // namespace meshtastic
|