10#ifndef STK_ARCH_X86_WIN32_H_
11#define STK_ARCH_X86_WIN32_H_
62 #if defined(_M_IX86) || defined(_M_X64)
64 #define __stk_dmb() _mm_mfence()
65 #elif defined(_M_ARM) || defined(_M_ARM64)
67 #define __stk_dmb() __dmb(_ARM_BARRIER_ISH)
69#elif defined(__GNUC__) || defined(__clang__)
70 #define __stk_dmb() __sync_synchronize()
72 #error "__stk_dmb() is not implemented for this compiler."
Contains interface definitions of the library.
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.
Concrete implementation of IPlatform driver for the x86 Win32 platform.
bool InitStack(EStackType stack_type, Stack *stack, IStackMemory *stack_memory, ITask *user_task)
Initialize stack memory of the user task.
TId GetTid() const
Get thread Id.
uint32_t GetTickResolution() const
Get resolution of the system tick timer in microseconds. Resolution means a number of microseconds be...
void SetEventOverrider(IEventOverrider *overrider)
Set platform event overrider.
void Start()
Start scheduling.
void Stop()
Stop scheduling.
void SwitchToNext()
Switch to a next task.
~PlatformX86Win32()
Destructor.
void ProcessHardFault()
Cause a hard fault of the system.
void ProcessTick()
Process one tick.
IWaitObject * Wait(ISyncObject *sync_obj, IMutex *mutex, Timeout timeout)
void Sleep(Timeout ticks)
Put calling process into a sleep state.
void SleepUntil(Ticks timestamp)
Put calling process into a sleep state until the specified timestamp.
void Initialize(IEventHandler *event_handler, IKernelService *service, uint32_t resolution_us, Stack *exit_trap)
Initialize scheduler's context.
Word GetCallerSP() const
Get caller's Stack Pointer (SP).
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...