Concrete implementation of IPlatform driver for the x86 Win32 platform.
More...
#include <stk_arch_x86-win32.h>
Concrete implementation of IPlatform driver for the x86 Win32 platform.
- Note
- Implemented for simulation purpose on Windows platform.
Definition at line 25 of file stk_arch_x86-win32.h.
◆ ~PlatformX86Win32()
| stk::PlatformX86Win32::~PlatformX86Win32 |
( |
| ) |
|
|
inline |
Destructor.
- Note
- MISRA deviation: [STK-DEV-005] Rule 10-3-2.
Definition at line 31 of file stk_arch_x86-win32.h.
◆ ForceContextSwitch()
| void stk::PlatformX86Win32::ForceContextSwitch |
( |
TId | id | ) |
|
|
overridevirtual |
◆ GetCallerSP()
| Word stk::PlatformX86Win32::GetCallerSP |
( |
| ) |
const |
|
overridevirtual |
Get caller's Stack Pointer (SP).
- Note
- Valid for a Thread process only.
- Returns
- Current value of the Stack Pointer (SP) of the calling process.
Implements stk::IPlatform.
◆ GetSysTimerCount()
| Cycles stk::PlatformX86Win32::GetSysTimerCount |
( |
| ) |
const |
|
overridevirtual |
Get system timer count value.
- Note
- ISR-safe.
- Returns
- 64-bit count value.
Implements stk::IPlatform.
◆ GetSysTimerFrequency()
| uint32_t stk::PlatformX86Win32::GetSysTimerFrequency |
( |
| ) |
const |
|
overridevirtual |
Get system timer frequency.
- Note
- ISR-safe.
- Returns
- Frequency (Hz).
Implements stk::IPlatform.
◆ GetTickResolution()
| uint32_t stk::PlatformX86Win32::GetTickResolution |
( |
| ) |
const |
|
overridevirtual |
Get resolution of the system tick timer in microseconds. Resolution means a number of microseconds between system tick timer ISRs.
- Returns
- Microseconds.
Implements stk::IPlatform.
◆ GetTid()
| TId stk::PlatformX86Win32::GetTid |
( |
| ) |
const |
|
overridevirtual |
◆ Initialize()
Initialize scheduler's context.
- Parameters
-
| [in] | event_handler | Event handler. |
| [in] | service | Kernel service. |
| [in] | resolution_us | Tick resolution in microseconds (for example 1000 equals to 1 millisecond resolution). |
| [in] | exit_trap | Stack of the Exit trap (optional, provided if kernel is operating in KERNEL_DYNAMIC mode). |
- Note
- Must be called once before Start().
Implements stk::IPlatform.
◆ InitStack()
Initialize stack memory of the user task.
- Parameters
-
| [in] | stack_type | Stack type. |
| [in] | stack | Stack descriptor. |
| [in] | stack_memory | Stack memory. |
| [in] | user_task | User task to which Stack belongs. |
Implements stk::IPlatform.
◆ ProcessHardFault()
| void stk::PlatformX86Win32::ProcessHardFault |
( |
| ) |
|
|
overridevirtual |
◆ ProcessTick()
| void stk::PlatformX86Win32::ProcessTick |
( |
| ) |
|
|
overridevirtual |
Process one tick.
- Note
- Normally system tick is processed by the platform driver implementation. In case system tick handler is used by the application and should not be implemented by the driver then disable driver's handler in stk_config.h like this:
#define STK_SYSTICK_HANDLER _STK_SYSTICK_HANDLER_DISABLE
and then call ProcessTick() from your custom tick handler.
Implements stk::IPlatform.
◆ Resume()
| void stk::PlatformX86Win32::Resume |
( |
Timeout | elapsed_ticks | ) |
|
|
overridevirtual |
Resume scheduling after a prior Suspend() call.
- Parameters
-
| [in] | elapsed_ticks | Number of ticks that elapsed during the suspended period. The kernel uses this value to advance internal time counters. |
- Note
- ISR-safe.
Implements stk::IPlatform.
◆ SetCpuFrequency()
| void stk::PlatformX86Win32::SetCpuFrequency |
( |
uint8_t | core_id, |
|
|
uint32_t | frequency ) |
|
overridevirtual |
Notify the scheduler of a CPU core's operating frequency.
- Parameters
-
| [in] | core_id | Target CPU core ID, or 0xFF to set the frequency for all cores. |
| [in] | frequency | CPU core frequency in Hz. |
- Note
- ISR-safe.
- Warning
- Specifying an incorrect frequency will degrade system timing accuracy. Always call this function whenever the core clock speed changes.
Implements stk::IPlatform.
◆ SetEventOverrider()
| void stk::PlatformX86Win32::SetEventOverrider |
( |
IEventOverrider * | overrider, |
|
|
bool | non_secure ) |
|
overridevirtual |
Set platform event overrider.
- Note
- Must be set prior call to IKernel::Start.
- Parameters
-
| [in] | overrider | Platform event overrider. |
| [in] | non_secure | True if instance comes from a Non-Secure binary (TrustZone only). |
Implements stk::IPlatform.
◆ Start()
| void stk::PlatformX86Win32::Start |
( |
| ) |
|
|
overridevirtual |
Start scheduling.
- Note
- This function never returns if kernel is initialized as KERNEL_STATIC. Must be called after Initialize().
Implements stk::IPlatform.
◆ Stop()
| void stk::PlatformX86Win32::Stop |
( |
| ) |
|
|
overridevirtual |
◆ Suspend()
| Timeout stk::PlatformX86Win32::Suspend |
( |
| ) |
|
|
overridevirtual |
Suspend scheduling.
- Returns
- Number of ticks available for the suspension period, as determined by the nearest pending wake-up. The caller may use this value to program a hardware timer for the tickless sleep interval.
- Note
- ISR-safe. Pair with Resume().
Implements stk::IPlatform.
The documentation for this class was generated from the following file: