32#if !defined(PORT_NEW_TYPES)
35#include "chporttypes.h"
50#if defined(PORT_DOES_NOT_PROVIDE_TYPES)
51#if !defined(PORT_ARCH_SIZEOF_DATA_PTR)
52#error "PORT_ARCH_SIZEOF_DATA_PTR not defined in chtypes.h"
55#if !defined(PORT_ARCH_SIZEOF_CODE_PTR)
56#error "PORT_ARCH_SIZEOF_CODE_PTR not defined in chtypes.h"
59#if !defined(PORT_ARCH_REGISTERS_WIDTH)
60#error "PORT_ARCH_REGISTERS_WIDTH not defined in chtypes.h"
63#if !defined(PORT_ARCH_REVERSE_ORDER)
64#error "PORT_ARCH_REVERSE_ORDER not defined in chtypes.h"
72#if defined(PORT_DOES_NOT_PROVIDE_TYPES) || defined(__DOXYGEN__)
82#if (PORT_ARCH_REGISTERS_WIDTH == 32) || defined(__DOXYGEN__)
94#elif PORT_ARCH_REGISTERS_WIDTH == 16
100typedef int16_t
msg_t;
104typedef int16_t
cnt_t;
106#elif PORT_ARCH_REGISTERS_WIDTH == 8
112typedef int16_t
msg_t;
119#error "unsupported PORT_ARCH_REGISTERS_WIDTH value"
149#define __CH_STRINGIFY(a) #a
158#define __CH_OFFSETOF(st, m) \
161 ((size_t)((char *)&((st *)0)->m - (char *)0)) \
169#define __CH_USED(x) (void)(x)
178#if defined(PORT_LIKELY) || defined(__DOXYGEN__)
179#define likely(x) PORT_LIKELY(x)
191#if defined(PORT_UNLIKELY) || defined(__DOXYGEN__)
192#define unlikely(x) PORT_UNLIKELY(x)
207#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.