ChibiOS 21.11.4
|
Kernel types | |
typedef port_rtcnt_t | rtcnt_t |
typedef port_rttime_t | rttime_t |
typedef port_syssts_t | syssts_t |
typedef port_stkalign_t | stkalign_t |
typedef uint8_t | tmode_t |
typedef uint8_t | tstate_t |
typedef uint8_t | trefs_t |
typedef uint8_t | tslices_t |
typedef uint32_t | tprio_t |
typedef int32_t | msg_t |
typedef int32_t | eventid_t |
typedef uint32_t | eventmask_t |
typedef uint32_t | eventflags_t |
typedef int32_t | cnt_t |
typedef uint32_t | ucnt_t |
Data Structures | |
struct | ch_virtual_timer |
Structure representing a Virtual Timer. More... | |
struct | ch_virtual_timers_list |
Type of virtual timers list header. More... | |
struct | ch_registry |
Type of a registry structure. More... | |
struct | ch_threads_queue |
Type of a threads queue. More... | |
struct | ch_thread |
Structure representing a thread. More... | |
struct | ch_ready_list |
Type of a ready list header. More... | |
struct | ch_os_instance_config |
Type of an system instance configuration. More... | |
struct | ch_os_instance |
System instance data structure. More... | |
struct | ch_system |
Type of system data structure. More... |
Macros | |
#define | __CH_STRINGIFY(a) |
Utility to make the parameter a quoted string. | |
#define | __CH_OFFSETOF(st, m) |
Structure field offset utility. | |
#define | __CH_USED(x) |
Marks an expression result as used. | |
#define | likely(x) |
Marks a boolean expression as likely true. | |
#define | unlikely(x) |
Marks a boolean expression as likely false. | |
#define | threadref(p) |
Safe cast of a queue pointer to a thread pointer. |
Typedefs | |
typedef unsigned | core_id_t |
Type of a core identifier. | |
typedef struct ch_thread | thread_t |
Type of a thread structure. | |
typedef struct ch_os_instance | os_instance_t |
Type of an OS instance structure. | |
typedef struct ch_virtual_timer | virtual_timer_t |
Type of a Virtual Timer. | |
typedef void(* | vtfunc_t) (virtual_timer_t *vtp, void *p) |
Type of a Virtual Timer callback function. | |
typedef struct ch_virtual_timers_list | virtual_timers_list_t |
Type of virtual timers list header. | |
typedef struct ch_registry | registry_t |
Type of a registry structure. | |
typedef thread_t * | thread_reference_t |
Type of a thread reference. | |
typedef struct ch_threads_queue | threads_queue_t |
Type of a threads queue. | |
typedef struct ch_ready_list | ready_list_t |
Type of a ready list header. | |
typedef struct ch_os_instance_config | os_instance_config_t |
Type of an system instance configuration. | |
typedef struct ch_system | ch_system_t |
Type of system data structure. |
Enumerations | |
enum | system_state_t { ch_sys_uninit = 0 , ch_sys_initializing = 1 , ch_sys_running = 2 , ch_sys_halted = 3 } |
Global state of the operating system. More... |
Functions | |
void | chSysHalt (const char *reason) |
Halts the system. |
#define __CH_STRINGIFY | ( | a | ) |
#define __CH_OFFSETOF | ( | st, | |
m ) |
Structure field offset utility.
[in] | st | structured type name |
[in] | m | field name in the structured type |
Definition at line 158 of file chearly.h.
Referenced by chRegFirstThread(), and chRegNextThread().
#define __CH_USED | ( | x | ) |
#define likely | ( | x | ) |
Marks a boolean expression as likely true.
[in] | x | a valid expression |
Definition at line 178 of file chearly.h.
Referenced by __thd_stackfill(), ch_dlist_insert(), chSchDoYieldS(), chSchPreemption(), chSchRescheduleS(), chThdSleepUntil(), chThdSleepUntilWindowed(), chThdWait(), vt_insert_first(), and vt_set_alarm().
#define unlikely | ( | x | ) |
Marks a boolean expression as likely false.
[in] | x | a valid expression |
Definition at line 191 of file chearly.h.
Referenced by __dbg_check_disable(), __dbg_check_enable(), __dbg_check_enter_isr(), __dbg_check_leave_isr(), __dbg_check_lock(), __dbg_check_lock_from_isr(), __dbg_check_suspend(), __dbg_check_unlock(), __dbg_check_unlock_from_isr(), ch_pqueue_insert_ahead(), ch_pqueue_insert_behind(), chDbgCheckClassI(), chDbgCheckClassS(), chSchWakeupS(), chSemWaitTimeoutS(), chThdEnqueueTimeoutS(), chThdExitS(), chThdSuspendTimeoutS(), and chVTDoTickI().
#define threadref | ( | p | ) |
Safe cast of a queue pointer to a thread pointer.
[in] | p | pointer to a queue/list structure |
Definition at line 206 of file chearly.h.
Referenced by __sch_ready_ahead(), __sch_ready_behind(), __sch_reschedule_ahead(), __sch_reschedule_behind(), __sch_wakeup(), ch_sch_prio_insert(), chCondBroadcastI(), chCondSignal(), chCondSignalI(), chMsgPollS(), chMsgWaitS(), chMsgWaitTimeoutS(), chMtxLockS(), chMtxUnlock(), chMtxUnlockAllS(), chMtxUnlockS(), chRegFirstThread(), chRegNextThread(), chSchDoPreemption(), chSchGoSleepS(), chSchSelectFirst(), chSemAddCounterI(), chSemResetWithMessageI(), chSemSignal(), chSemSignalI(), chSemSignalWait(), chSysGetIdleThreadX(), chThdCreateStatic(), chThdCreateSuspendedI(), chThdDoDequeueNextI(), and chThdExitS().
typedef port_rtcnt_t rtcnt_t |
typedef port_rttime_t rttime_t |
typedef port_syssts_t syssts_t |
typedef port_stkalign_t stkalign_t |
typedef uint32_t eventmask_t |
typedef uint32_t eventflags_t |
typedef unsigned core_id_t |
typedef struct ch_os_instance os_instance_t |
typedef struct ch_virtual_timer virtual_timer_t |
Type of a Virtual Timer.
Definition at line 60 of file chobjects.h.
typedef void(* vtfunc_t) (virtual_timer_t *vtp, void *p) |
Type of a Virtual Timer callback function.
[in] | vtp | pointer to the virtual_timer_t calling this callback |
[in] | p | optional argument to the callback |
0 | if the timer must not be reloaded. |
Definition at line 70 of file chobjects.h.
typedef struct ch_virtual_timers_list virtual_timers_list_t |
Type of virtual timers list header.
typedef struct ch_registry registry_t |
Type of a registry structure.
typedef thread_t* thread_reference_t |
Type of a thread reference.
Definition at line 138 of file chobjects.h.
typedef struct ch_threads_queue threads_queue_t |
Type of a threads queue.
typedef struct ch_ready_list ready_list_t |
Type of a ready list header.
typedef struct ch_os_instance_config os_instance_config_t |
Type of an system instance configuration.
typedef struct ch_system ch_system_t |
Type of system data structure.
enum system_state_t |
Global state of the operating system.
Enumerator | |
---|---|
ch_sys_uninit | |
ch_sys_initializing | |
ch_sys_running | |
ch_sys_halted |
Definition at line 50 of file chobjects.h.
void chSysHalt | ( | const char * | reason | ) |
Halts the system.
This function is invoked by the operating system when an unrecoverable error is detected, for example because a programming error in the application code that triggers an assertion while in debug mode.
[in] | reason | pointer to an error string |
Definition at line 209 of file chsys.c.
References __trace_halt, CH_CFG_SYSTEM_HALT_HOOK, ch_sys_halted, currcore, nil, port_disable(), and ch_system::state.
Referenced by __dbg_check_disable(), __dbg_check_enable(), __dbg_check_enter_isr(), __dbg_check_leave_isr(), __dbg_check_lock(), __dbg_check_lock_from_isr(), __dbg_check_suspend(), __dbg_check_unlock(), __dbg_check_unlock_from_isr(), chDbgCheckClassI(), and chDbgCheckClassS().