31#if !defined(PORT_NEW_TYPES)
34#include "chporttypes.h"
49#if defined(PORT_DOES_NOT_PROVIDE_TYPES)
50#if !defined(PORT_ARCH_SIZEOF_DATA_PTR)
51#error "PORT_ARCH_SIZEOF_DATA_PTR not defined in chtypes.h"
54#if !defined(PORT_ARCH_SIZEOF_CODE_PTR)
55#error "PORT_ARCH_SIZEOF_CODE_PTR not defined in chtypes.h"
58#if !defined(PORT_ARCH_REGISTERS_WIDTH)
59#error "PORT_ARCH_REGISTERS_WIDTH not defined in chtypes.h"
62#if !defined(PORT_ARCH_REVERSE_ORDER)
63#error "PORT_ARCH_REVERSE_ORDER not defined in chtypes.h"
71#if defined(PORT_DOES_NOT_PROVIDE_TYPES) || defined(__DOXYGEN__)
81#if (PORT_ARCH_REGISTERS_WIDTH == 32) || defined(__DOXYGEN__)
93#elif PORT_ARCH_REGISTERS_WIDTH == 16
103typedef int16_t
cnt_t;
105#elif PORT_ARCH_REGISTERS_WIDTH == 8
111typedef int16_t
msg_t;
118#error "unsupported PORT_ARCH_REGISTERS_WIDTH value"
148#define __CH_STRINGIFY(a) #a
157#define __CH_OFFSETOF(st, m) \
160 ((size_t)((char *)&((st *)0)->m - (char *)0)) \
168#define __CH_USED(x) (void)(x)
177#if defined(PORT_LIKELY) || defined(__DOXYGEN__)
178#define likely(x) PORT_LIKELY(x)
190#if defined(PORT_UNLIKELY) || defined(__DOXYGEN__)
191#define unlikely(x) PORT_UNLIKELY(x)
206#define threadref(p) ((thread_t *)(void *)(p))
Template port system types.
unsigned core_id_t
Type of a core identifier.
struct ch_os_instance os_instance_t
Type of an OS instance structure.
port_stkalign_t stkalign_t
struct ch_thread thread_t
Type of a thread structure.
void chSysHalt(const char *reason)
Halts the system.
uint64_t port_stkalign_t
Type of stack and memory alignment enforcement.
uint32_t port_rtcnt_t
Realtime counter.
uint64_t port_rttime_t
Realtime accumulator.
uint32_t port_syssts_t
System status word.
System instance data structure.
Structure representing a thread.