|
SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
#include <stdio.h>#include "stk.h"#include "sync/stk_sync.h"#include "time/stk_time.h"#include "memory/stk_memory.h"#include "FreeRTOS.h"Go to the source code of this file.
Classes | |
| struct | FrtosTask |
| struct | FrtosTask::NotifySlot |
| struct | FrtosQueue |
| struct | FrtosMutexBase |
| struct | FrtosRecursiveMutex |
| struct | FrtosFastMutex |
| struct | FrtosSemaphore |
| struct | FrtosQueueSet |
| struct | FrtosTimer |
| struct | PendCall |
| struct | FrtosPendDrainer |
| struct | FrtosEventGroup |
| struct | FrtosStreamBuffer |
| struct | FrtosMessageBuffer |
| struct | FrtosMessageBuffer::MsgEnvelope |
Macros | |
| #define | FREERTOS_STK_WRAPPER_VERSION "FreeRTOS-STK Wrapper v1.1" |
| #define | FREERTOS_STK_MIN_STACK_WORDS STK_STACK_SIZE_MIN |
Typedefs | |
| using | FrtosKernel |
Enumerations | |
| enum class | SemKind : uint8_t { None = 0x00U , Counting = 0x80U , Mutex = 0x81U } |
Variables | |
| static stk::memory::MemoryAllocator::Stats | s_MemStats (10240U) |
| static FrtosKernel | g_StkKernel |
| static stk::time::TimerHost * | g_TimerHost = nullptr |
| static stk::Word | g_TimerHostBuf [StkGetWordCountForType< stk::time::TimerHost >()] |
| static stk::sync::PipeT< PendCall, 8U > | g_PendCallPipe |
| static stk::Word | g_PendDrainerBuf [StkGetWordCountForType< stk::time::TimerHost::Timer >()] |
| static stk::time::TimerHost::Timer * | g_PendDrainer = nullptr |
| #define FREERTOS_STK_MIN_STACK_WORDS STK_STACK_SIZE_MIN |
Definition at line 41 of file freertos_stk.cpp.
Referenced by xTaskCreate(), and xTaskCreateStatic().
| #define FREERTOS_STK_WRAPPER_VERSION "FreeRTOS-STK Wrapper v1.1" |
Definition at line 25 of file freertos_stk.cpp.
| using FrtosKernel |
Definition at line 357 of file freertos_stk.cpp.
|
strong |
| Enumerator | |
|---|---|
| None | Sentinel: not a FrtosSemaphore (e.g. plain FrtosQueue). |
| Counting | Binary or counting semaphore (backed by stk::sync::Semaphore). |
| Mutex | Mutex or recursive mutex (backed by stk::sync::FastMutex or stk::sync::Mutex). |
Definition at line 591 of file freertos_stk.cpp.
|
inlinestatic |
Definition at line 3088 of file freertos_stk.cpp.
References stk::sync::EventFlags::OPT_NO_CLEAR, stk::sync::EventFlags::OPT_WAIT_ALL, stk::sync::EventFlags::OPT_WAIT_ANY, pdFALSE, and pdTRUE.
Referenced by xEventGroupWaitBits().
|
static |
Definition at line 2416 of file freertos_stk.cpp.
References FrtosSemaphore::m_mtx, Mutex, ObjAlloc(), and ObjFree().
Referenced by xSemaphoreCreateMutex(), and xSemaphoreCreateRecursiveMutex().
|
static |
Definition at line 2434 of file freertos_stk.cpp.
References FrtosSemaphore::m_cb_owned, FrtosSemaphore::m_mtx, Mutex, and FrtosSemaphore::~FrtosSemaphore().
Referenced by xSemaphoreCreateMutexStatic(), and xSemaphoreCreateRecursiveMutexStatic().
|
static |
Definition at line 1111 of file freertos_stk.cpp.
References g_StkKernel, and stk::IKernel::KSTATE_INACTIVE.
Referenced by vTaskStartScheduler(), xTaskCreate(), and xTaskCreateStatic().
|
static |
Definition at line 931 of file freertos_stk.cpp.
References g_PendDrainer, g_PendDrainerBuf, and g_TimerHost.
Referenced by xTimerPendFunctionCall().
| void free | ( | void * | ptr | ) |
|
static |
Definition at line 50 of file freertos_stk.cpp.
Referenced by xTaskGetHandle().
|
inlinestatic |
Definition at line 301 of file freertos_stk.cpp.
References configMAX_PRIORITIES.
Referenced by FrtosTask::FrtosTask(), vTaskPrioritySet(), xTaskCreate(), and xTaskCreateStatic().
|
inlinestatic |
< Block indefinitely.
Definition at line 330 of file freertos_stk.cpp.
References stk::NO_WAIT, portMAX_DELAY, and stk::WAIT_INFINITE.
Referenced by ulTaskNotifyTakeIndexed(), vTaskDelay(), xEventGroupSync(), xEventGroupWaitBits(), xMessageBufferReceive(), xMessageBufferSend(), xQueuePeek(), xQueueReceive(), xQueueSelectFromSet(), xQueueSend(), xQueueSendToFront(), xSemaphoreTake(), xStreamBufferReceive(), xStreamBufferSend(), xTaskNotifyWaitIndexed(), and xTimerPendFunctionCall().
|
static |
Definition at line 605 of file freertos_stk.cpp.
References Counting, Mutex, and None.
Referenced by QueueHandleAsMutex(), xQueueAddToSet(), and xQueueRemoveFromSet().
|
inlinestatic |
Definition at line 344 of file freertos_stk.cpp.
References stk::hw::IsInsideISR().
|
static |
Definition at line 945 of file freertos_stk.cpp.
References g_PendDrainer, and g_TimerHost.
Referenced by xTimerPendFunctionCallFromISR().
| void * malloc | ( | size_t | size | ) |
|
static |
Definition at line 4212 of file freertos_stk.cpp.
References stk::memory::BlockMemoryPool::AlignBlockSize(), and FrtosMessageBuffer::ENVELOPE_SIZE.
Referenced by xMessageBufferCreate().
|
static |
Definition at line 3351 of file freertos_stk.cpp.
References eIncrement, eNoAction, eSetBits, eSetValueWithoutOverwrite, eSetValueWithOverwrite, pdFAIL, pdPASS, FrtosTask::NotifySlot::pending, and FrtosTask::NotifySlot::value.
Referenced by xTaskNotifyAndQueryIndexed(), and xTaskNotifyIndexed().
|
static |
Definition at line 137 of file freertos_stk.cpp.
References pvPortMalloc().
Referenced by CreateMutexInternal(), FrtosQueueSet::FrtosQueueSet(), FrtosSemaphore::FrtosSemaphore(), xEventGroupCreate(), xMessageBufferCreate(), xMessageBufferCreateWithCallback(), xQueueCreate(), xQueueCreateSet(), xSemaphoreCreateBinary(), xSemaphoreCreateCounting(), xStreamBufferCreate(), xStreamBufferCreateWithCallback(), xTaskCreate(), and xTimerCreate().
|
static |
Definition at line 164 of file freertos_stk.cpp.
References pvPortMalloc().
Referenced by FrtosQueue::AllocBuffer(), FrtosMessageBuffer::FrtosMessageBuffer(), FrtosQueueSet::FrtosQueueSet(), xStreamBufferCreate(), xStreamBufferCreateWithCallback(), and xTaskCreate().
|
static |
Definition at line 150 of file freertos_stk.cpp.
References vPortFree().
Referenced by CreateMutexInternal(), vEventGroupDelete(), vMessageBufferDelete(), vQueueDelete(), vSemaphoreDelete(), vStreamBufferDelete(), vTaskDelete(), xQueueCreate(), xQueueCreateSet(), xSemaphoreCreateBinary(), xSemaphoreCreateCounting(), xTaskCreate(), and xTimerDelete().
|
inlinestatic |
Definition at line 175 of file freertos_stk.cpp.
References vPortFree().
Referenced by xStreamBufferCreate(), xStreamBufferCreateWithCallback(), FrtosMessageBuffer::~FrtosMessageBuffer(), FrtosQueue::~FrtosQueue(), FrtosQueueSet::~FrtosQueueSet(), FrtosStreamBuffer::~FrtosStreamBuffer(), and FrtosTask::~FrtosTask().
|
static |
Definition at line 184 of file freertos_stk.cpp.
References vPortFree().
Referenced by xMessageBufferCreate(), xMessageBufferCreateWithCallback(), FrtosQueueSet::~FrtosQueueSet(), and FrtosSemaphore::~FrtosSemaphore().
|
inlinestatic |
Definition at line 2081 of file freertos_stk.cpp.
References GetSemKindFromHandle(), and Mutex.
Referenced by xQueueGetMutexHolder(), and xQueueGetMutexHolderFromISR().
|
inlinestatic |
Definition at line 796 of file freertos_stk.cpp.
References STK_UNUSED.
Referenced by xQueueOverwrite(), xQueueOverwriteFromISR(), xQueueSend(), xQueueSendFromISR(), xQueueSendToFront(), xQueueSendToFrontFromISR(), xSemaphoreGive(), and xSemaphoreGiveFromISR().
|
static |
< Number of per-task notification slots (indexed API).
< Number of per-task notification slots (indexed API).
Definition at line 3334 of file freertos_stk.cpp.
References configTASK_NOTIFICATION_ARRAY_ENTRIES, STK_ASSERT, and xTaskGetCurrentTaskHandle().
Referenced by ulTaskNotifyTakeIndexed(), ulTaskNotifyValueClearIndexed(), xTaskNotifyAndQueryIndexed(), xTaskNotifyGiveIndexed(), xTaskNotifyIndexed(), xTaskNotifyStateClearIndexed(), and xTaskNotifyWaitIndexed().
|
inlinestatic |
Definition at line 3079 of file freertos_stk.cpp.
References stk::sync::EventFlags::IsError().
Referenced by xEventGroupClearBits(), xEventGroupClearBitsFromISR(), xEventGroupSetBits(), xEventGroupSync(), and xEventGroupWaitBits().
|
staticconstexpr |
Definition at line 44 of file freertos_stk.cpp.
|
inlinestatic |
Definition at line 311 of file freertos_stk.cpp.
References configMAX_PRIORITIES.
Referenced by uxTaskGetSystemState(), uxTaskPriorityGet(), and vTaskList().
|
static |
Definition at line 905 of file freertos_stk.cpp.
Referenced by FrtosPendDrainer::OnExpired(), xTimerPendFunctionCall(), and xTimerPendFunctionCallFromISR().
|
static |
Definition at line 909 of file freertos_stk.cpp.
Referenced by EnsurePendDrainer(), and KickPendDrainerFromISR().
|
static |
Definition at line 908 of file freertos_stk.cpp.
Referenced by EnsurePendDrainer().
|
static |
Definition at line 365 of file freertos_stk.cpp.
Referenced by FrtosTimer::EnsureTimerHost().
|
static |
Definition at line 818 of file freertos_stk.cpp.
Referenced by FrtosTimer::EnsureTimerHost().
|
static |
Definition at line 821 of file freertos_stk.cpp.
Referenced by FrtosTimer::EnsureTimerHost().
|
static |