51#if (CH_CFG_NO_IDLE_THREAD == FALSE) || defined(__DOXYGEN__)
94#if CH_CFG_SMP_MODE == TRUE
95 core_id = port_get_core_id();
114#if (CH_CFG_USE_REGISTRY == TRUE) && (CH_CFG_SMP_MODE == FALSE)
119#if CH_CFG_SMP_MODE == FALSE
130#if CH_DBG_TRACE_MASK != CH_DBG_TRACE_MASK_DISABLED
136#if CH_DBG_STATISTICS == TRUE
140#if CH_CFG_NO_IDLE_THREAD == FALSE
142#if CH_CFG_USE_REGISTRY == TRUE
155#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || (CH_CFG_USE_DYNAMIC == TRUE)
162#if CH_DBG_STATISTICS == TRUE
170#if CH_CFG_NO_IDLE_THREAD == FALSE
181#if CH_DBG_FILL_THREADS == TRUE
183 (uint8_t *)idle_descriptor.
wend);
#define chDbgAssert(c, r)
Condition assertion.
static void __dbg_object_init(system_debug_t *sdp)
Debug support initialization.
#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip)
OS instance initialization hook.
#define CH_CFG_IDLE_LOOP_HOOK()
Idle Loop hook.
static void __idle_thread(void *p)
This function implements the idle thread infinite loop.
void chInstanceObjectInit(os_instance_t *oip, const os_instance_config_t *oicp)
Initializes a system instance.
static void ch_pqueue_init(ch_priority_queue_t *pqp)
Priority queue initialization.
unsigned core_id_t
Type of a core identifier.
struct ch_os_instance os_instance_t
Type of an OS instance structure.
struct ch_os_instance_config os_instance_config_t
Type of an system instance configuration.
static void port_wait_for_interrupt(void)
Enters an architecture-dependent IRQ-waiting mode.
ROMCONST chdebug_t ch_debug
static void __reg_object_init(registry_t *rp)
Initializes a registry.
static void __rfcu_object_init(rfcu_t *rfcup)
Runtime Faults Collection Unit initialization.
#define CH_STATE_CURRENT
Currently running.
#define IDLEPRIO
Idle priority.
#define NORMALPRIO
Normal priority.
static void __stats_object_init(kernel_stats_t *ksp)
Statistics initialization.
thread_t * __thd_object_init(os_instance_t *oip, thread_t *tp, const char *name, tprio_t prio)
Initializes a thread structure.
thread_t * chThdCreateI(const thread_descriptor_t *tdp)
Creates a new thread.
void __thd_stackfill(uint8_t *startp, uint8_t *endp)
Stack fill utility.
NOINLINE void chTMStartMeasurementX(time_measurement_t *tmp)
Starts a measurement.
static void __vt_object_init(virtual_timers_list_t *vtlp)
Virtual Timers instance initialization.
void __trace_object_init(trace_buffer_t *tbp)
Circular trace buffer initialization.
stkalign_t * mainthread_base
Lower limit of the main function thread stack.
stkalign_t * idlethread_base
Lower limit of the dedicated idle thread stack.
stkalign_t * idlethread_end
Upper limit of the dedicated idle thread stack.
kernel_stats_t kernel_stats
Global kernel statistics.
registry_t reglist
Registry header.
rfcu_t rfcu
Runtime Faults Collection Unit for this instance.
const os_instance_config_t * config
Pointer to the instance configuration data.
thread_t mainthread
Main thread descriptor.
virtual_timers_list_t vtlist
Virtual timers delta list header.
core_id_t core_id
Core associated to this instance.
system_debug_t dbg
System debug.
ready_list_t rlist
Ready list header.
trace_buffer_t trace_buffer
Trace buffer.
thread_t * current
The currently running thread.
ch_priority_queue_t pqueue
Threads ordered queues header.
Type of system data structure.
os_instance_t * instances[PORT_CORES_NUMBER]
Initialized OS instances or NULL.
time_measurement_t stats
Thread statistics.
stkalign_t * wabase
Working area base address.
tstate_t state
Current thread state.
Type of a thread descriptor.
stkalign_t * wbase
Pointer to the working area base.
stkalign_t * wend
Pointer to the working area end.