41 #define CH_INTEGRITY_RLIST                  1U    42 #define CH_INTEGRITY_VTLIST                 2U    43 #define CH_INTEGRITY_REGISTRY               4U    44 #define CH_INTEGRITY_PORT                   8U    77 #if defined(PORT_IRQ_IS_VALID_PRIORITY) || defined(__DOXYGEN__)    78 #define CH_IRQ_IS_VALID_PRIORITY(prio)                                      \    79   PORT_IRQ_IS_VALID_PRIORITY(prio)    81 #define CH_IRQ_IS_VALID_PRIORITY(prio) false    95 #if defined(PORT_IRQ_IS_VALID_KERNEL_PRIORITY) || defined(__DOXYGEN__)    96 #define CH_IRQ_IS_VALID_KERNEL_PRIORITY(prio)                               \    97   PORT_IRQ_IS_VALID_KERNEL_PRIORITY(prio)    99 #define CH_IRQ_IS_VALID_KERNEL_PRIORITY(prio) false   109 #define CH_IRQ_PROLOGUE()                                                   \   110   PORT_IRQ_PROLOGUE();                                                      \   111   CH_CFG_IRQ_PROLOGUE_HOOK();                                               \   112   _stats_increase_irq();                                                    \   113   _trace_isr_enter(__func__);                                               \   114   _dbg_check_enter_isr()   124 #define CH_IRQ_EPILOGUE()                                                   \   125   _dbg_check_leave_isr();                                                   \   126   _trace_isr_leave(__func__);                                               \   127   CH_CFG_IRQ_EPILOGUE_HOOK();                                               \   137 #define CH_IRQ_HANDLER(id) PORT_IRQ_HANDLER(id)   151 #define CH_FAST_IRQ_HANDLER(id) PORT_FAST_IRQ_HANDLER(id)   169 #define S2RTC(freq, sec) ((freq) * (sec))   183 #define MS2RTC(freq, msec) (rtcnt_t)((((freq) + 999UL) / 1000UL) * (msec))   197 #define US2RTC(freq, usec) (rtcnt_t)((((freq) + 999999UL) / 1000000UL) * (usec))   211 #define RTC2S(freq, n) ((((n) - 1UL) / (freq)) + 1UL)   225 #define RTC2MS(freq, n) ((((n) - 1UL) / ((freq) / 1000UL)) + 1UL)   239 #define RTC2US(freq, n) ((((n) - 1UL) / ((freq) / 1000000UL)) + 1UL)   252 #if (PORT_SUPPORTS_RT == TRUE) || defined(__DOXYGEN__)   253 #define chSysGetRealtimeCounterX() (rtcnt_t)port_rt_get_counter_value()   266 #define chSysSwitch(ntp, otp) {                                             \   268   _trace_switch(ntp, otp);                                                  \   269   _stats_ctxswc(ntp, otp);                                                  \   270   CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp);                                     \   271   port_switch(ntp, otp);                                                    \   278 #if !defined(__DOXYGEN__)   290 #if PORT_SUPPORTS_RT == TRUE   313   _dbg_check_disable();
   330   _dbg_check_suspend();
   376               "priority order violation");
   397   _dbg_check_lock_from_isr();
   415   _dbg_check_unlock_from_isr();
   448 #if (CH_CFG_NO_IDLE_THREAD == FALSE) || defined(__DOXYGEN__) static void chSysLock(void)
Enters the kernel lock state. 
 
void chSysPolledDelayX(rtcnt_t cycles)
Polled delay. 
 
static void port_enable(void)
Enables all the interrupt sources. 
 
void _stats_start_measure_crit_thd(void)
Starts the measurement of a thread critical zone. 
 
static void chSysUnlock(void)
Leaves the kernel lock state. 
 
static void port_disable(void)
Disables all the interrupt sources. 
 
static void port_unlock(void)
Kernel-unlock action. 
 
static void port_lock_from_isr(void)
Kernel-lock action from an interrupt handler. 
 
void _stats_stop_measure_crit_thd(void)
Stops the measurement of a thread critical zone. 
 
static void chSysUnconditionalUnlock(void)
Unconditionally leaves the kernel lock state. 
 
static void port_lock(void)
Kernel-lock action. 
 
void chSysTimerHandlerI(void)
Handles time ticks for round robin preemption and timer increments. 
 
bool chSysIntegrityCheckI(unsigned testmask)
System integrity check. 
 
ready_list_t rlist
Ready list header. 
 
void chSysInit(void)
ChibiOS/RT initialization. 
 
ch_system_t ch
System data structures. 
 
static void chSysUnlockFromISR(void)
Leaves the kernel lock state from within an interrupt handler. 
 
syssts_t chSysGetStatusAndLockX(void)
Returns the execution status and enters a critical zone. 
 
static void chSysLockFromISR(void)
Enters the kernel lock state from within an interrupt handler. 
 
void chSysRestoreStatusX(syssts_t sts)
Restores the specified execution status and leaves a critical zone. 
 
static thread_t * chSysGetIdleThreadX(void)
Returns a pointer to the idle thread. 
 
bool chSysIsCounterWithinX(rtcnt_t cnt, rtcnt_t start, rtcnt_t end)
Realtime window test. 
 
void _stats_start_measure_crit_isr(void)
Starts the measurement of an ISR critical zone. 
 
static void chSysEnable(void)
Lowers the system interrupt priority mask to user level. 
 
uint64_t stkalign_t
Type of stack and memory alignment enforcement. 
 
#define chDbgAssert(c, r)
Condition assertion. 
 
static void chSysDisable(void)
Raises the system interrupt priority mask to the maximum level. 
 
static void port_unlock_from_isr(void)
Kernel-unlock action from an interrupt handler. 
 
static syssts_t port_get_irq_status(void)
Returns a word encoding the current interrupts status. 
 
static void port_suspend(void)
Disables the interrupt sources below kernel-level priority. 
 
static void chSysUnconditionalLock(void)
Unconditionally enters the kernel lock state. 
 
static bool port_irq_enabled(syssts_t sts)
Checks the interrupt status. 
 
void _stats_stop_measure_crit_isr(void)
Stops the measurement of an ISR critical zone. 
 
static void chSysSuspend(void)
Raises the system interrupt priority mask to system level. 
 
Structure representing a thread.