![]() |
SuperTinyKernel™ RTOS 1.06.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Hardware Abstraction Layer (HAL) declarations for the stk::hw namespace.
More...
Go to the source code of this file.
Classes | |
| class | stk::hw::CriticalSection |
| Nestable, SMP-safe critical section that combines local interrupt masking with a global cross-core spinlock. More... | |
| class | stk::hw::CriticalSection::ScopedLock |
| RAII guard that enters the critical section on construction and exits it on destruction. More... | |
| class | stk::hw::SpinLock |
| Atomic busy-wait lock used as the global cross-core synchronisation primitive inside CriticalSection. More... | |
| class | stk::hw::HiResClock |
| High-resolution clock for high-precision measurements. More... | |
Namespaces | |
| namespace | stk |
| Namespace of STK package. | |
| namespace | stk::hw |
| Hardware Abstraction Layer (HAL) for architecture-specific operations. | |
Macros | |
| #define | STK_PANIC_HANDLER(id) |
Functions | |
| void | STK_PANIC_HANDLER_DEFAULT (stk::EKernelPanicId id) |
| Default panic handler: disable interrupts, record the id, and spin in a tight loop — a defined, detectable safe state. | |
| static __stk_forceinline void | stk::STK_KERNEL_PANIC (stk::EKernelPanicId id) |
| Called when the kernel detects an unrecoverable internal fault. | |
| template<typename T> | |
| static constexpr Word | stk::hw::PtrToWord (T *const ptr) noexcept |
| Cast a pointer to a CPU register-width integer. | |
| template<typename T> | |
| static constexpr T * | stk::hw::WordToPtr (Word value) noexcept |
| Cast a CPU register-width integer back to a pointer. | |
| bool | stk::hw::IsInsideISR () |
| Check whether the CPU is currently executing inside a hardware interrupt service routine (ISR). | |
| template<typename T> | |
| static __stk_forceinline T | stk::hw::ReadVolatile64 (volatile const T *addr) |
| Atomically read a 64-bit volatile value. | |
| template<typename T> | |
| static __stk_forceinline void | stk::hw::WriteVolatile64 (volatile T *addr, T value) |
| Atomically write a 64-bit volatile value. | |
| static constexpr TId | stk::GetTidFromUserTask (const ITask *task) noexcept |
| Get task identifier from ITask instance. | |
| static constexpr ITask * | stk::GetUserTaskFromTid (TId task_id) noexcept |
| Get task instance from its identifier. | |
| static __stk_forceinline void | STK_MEMCPY (void *const dest, const void *const src, const size_t size) |
| A wrapper for a built-in memcpy, redefine to your own if required. | |
Hardware Abstraction Layer (HAL) declarations for the stk::hw namespace.
Selects and includes the correct architecture back-end header based on the active architecture macro (_STK_ARCH_ARM_CORTEX_M, _STK_ARCH_RISC_V, _STK_ARCH_X86_WIN32), then declares the portable stk::hw interface that the rest of the kernel uses:
Definition in file stk_arch.h.
| #define STK_PANIC_HANDLER | ( | id | ) |
Definition at line 57 of file stk_arch.h.
Referenced by stk::STK_KERNEL_PANIC().
|
static |
A wrapper for a built-in memcpy, redefine to your own if required.
Definition at line 534 of file stk_arch.h.
References __stk_forceinline, stk::hw::PtrToWord(), and STK_UNUSED.
Referenced by stk::sync::Pipe::DrainLocked(), stk::sync::MessageQueue::Get(), osKernelGetInfo(), stk::sync::MessageQueue::Peek(), stk::sync::MessageQueue::PeekFront(), stk::sync::MessageQueue::Put(), stk::sync::MessageQueue::PutFront(), stk::sync::Pipe::Read(), stk::sync::PipeT< Timer *, 32U >::ReadBulk(), stk::sync::Pipe::Write(), stk::sync::Pipe::WriteBulk(), stk::sync::PipeT< Timer *, 32U >::WriteBulk(), xMessageBufferReceive(), xMessageBufferReceiveFromISR(), xMessageBufferSend(), and xMessageBufferSendFromISR().
|
extern |
Default panic handler: disable interrupts, record the id, and spin in a tight loop — a defined, detectable safe state.