10#ifndef STK_ARCH_X86_WIN32_H_
11#define STK_ARCH_X86_WIN32_H_
65 #if defined(_M_IX86) || defined(_M_X64)
68 #elif defined(_M_ARM) || defined(_M_ARM64)
72#elif defined(__GNUC__) || defined(__clang__)
75 #error "__stk_dmb() is not implemented for this compiler."
static void __stk_dmb()
Hardware memory barrier: ensures visibility across cores and bus masters.
Contains interface definitions of the library.
#define __stk_forceinline
Forces compiler to always inline the decorated function, regardless of optimisation level.
Namespace of STK package.
uintptr_t Word
Native processor word type.
int64_t Ticks
Ticks value.
int32_t Timeout
Timeout time (ticks).
PlatformArmCortexM PlatformDefault
Default platform implementation.
uint64_t Cycles
Cycles value.
Word TId
Task (thread) id.
Concrete implementation of IPlatform driver for the x86 Win32 platform.
void Sleep(Timeout ticks) override
Put calling process into a sleep state.
void Resume(Timeout elapsed_ticks) override
Resume scheduling after a prior Suspend() call.
void Stop() override
Stop scheduling.
void Initialize(IEventHandler *event_handler, IKernelService *service, uint32_t resolution_us, Stack *exit_trap) override
Initialize scheduler's context.
Word GetCallerSP() const override
Get caller's Stack Pointer (SP).
void Start() override
Start scheduling.
uint32_t GetSysTimerFrequency() const override
Get system timer frequency.
uint32_t GetTickResolution() const override
Get resolution of the system tick timer in microseconds. Resolution means a number of microseconds be...
~PlatformX86Win32()
Destructor.
void InitStack(EStackType stack_type, Stack *stack, IStackMemory *stack_memory, ITask *user_task) override
Initialize stack memory of the user task.
void ProcessHardFault() override
Cause a hard fault of the system.
void SetEventOverrider(IEventOverrider *overrider) override
Set platform event overrider.
void ProcessTick() override
Process one tick.
Cycles GetSysTimerCount() const override
Get system timer count value.
bool SleepUntil(Ticks timestamp) override
Put calling process into a sleep state until the specified timestamp.
IWaitObject * Wait(ISyncObject *sync_obj, IMutex *mutex, Timeout timeout) override
Put calling process into a waiting state until synchronization object is signaled or timeout occurs.
TId GetTid() const override
Get thread Id.
void SwitchToNext() override
Switch to a next task.
Timeout Suspend() override
Suspend scheduling.
Interface for a stack memory region.
Interface for mutex synchronization primitive.
Interface for a user task.
Interface for a platform driver.
Interface for a back-end event handler.
Interface for a platform event overrider.
Interface for the kernel services exposed to the user processes during run-time when Kernel started s...