43#define PORT_SUPPORTS_RT FALSE
49#define PORT_NATURAL_ALIGN sizeof (void *)
55#define PORT_STACK_ALIGN sizeof (stkalign_t)
61#define PORT_WORKING_AREA_ALIGN sizeof (stkalign_t)
71#define PORT_ARCHITECTURE_XXX
76#define PORT_ARCHITECTURE_XXX_YYY
81#define PORT_ARCHITECTURE_NAME "XXX Architecture"
86#if defined(__GNUC__) || defined(__DOXYGEN__)
87#define PORT_COMPILER_NAME "GCC " __VERSION__
90#error "unsupported compiler"
96#define PORT_INFO "no info"
109#if !defined(PORT_IDLE_THREAD_STACK_SIZE) || defined(__DOXYGEN__)
110#define PORT_IDLE_THREAD_STACK_SIZE 32
118#if !defined(PORT_INT_REQUIRED_STACK) || defined(__DOXYGEN__)
119#define PORT_INT_REQUIRED_STACK 256
125#if !defined(PORT_XXX_WFI_SLEEP_IDLE) || defined(__DOXYGEN__)
126#define PORT_XXX_ENABLE_WFI_IDLE FALSE
139#if !defined(_FROM_ASM_)
181#define PORT_THD_FUNCTION(tname, arg) void tname(void *arg)
188#define PORT_SETUP_CONTEXT(tp, wbase, wtop, pf, arg) { \
195#define PORT_WA_SIZE(n) (sizeof(struct port_intctx) + \
196 sizeof(struct port_extctx) + \
197 ((size_t)(n)) + ((size_t)(PORT_INT_REQUIRED_STACK)))
207#define PORT_WORKING_AREA(s, n) \
208 stkalign_t s[THD_WORKING_AREA_SIZE(n) / sizeof (stkalign_t)]
213#define PORT_IRQ_IS_VALID_PRIORITY(n) false
218#define PORT_IRQ_IS_VALID_KERNEL_PRIORITY(n) false
225#define PORT_IRQ_PROLOGUE()
232#define PORT_IRQ_EPILOGUE()
240#define PORT_IRQ_HANDLER(id) extern "C" void id(void)
242#define PORT_IRQ_HANDLER(id) void id(void)
251#define PORT_FAST_IRQ_HANDLER(id) extern "C" void id(void)
253#define PORT_FAST_IRQ_HANDLER(id) void id(void)
266#if !CH_DBG_ENABLE_STACK_CHECK || defined(__DOXYGEN__)
267#define port_switch(ntp, otp) _port_switch(ntp, otp)
269#define port_switch(ntp, otp) { \
270 register struct port_intctx *sp asm ("%r1"); \
271 if ((stkalign_t *)(sp - 1) < otp->wabase) \
272 chSysHalt("stack overflow"); \
273 _port_switch(ntp, otp); \
282#define port_get_lock_status() 0U
292#define port_is_locked(sts) ((sts) != 0U)
300#if !defined(_FROM_ASM_)
319#if !defined(_FROM_ASM_)
403#if PORT_XXX_ENABLE_WFI_IDLE
423#if !defined(_FROM_ASM_)
425#if CH_CFG_ST_TIMEDELTA > 0
426#include "chcore_timer.h"
struct ch_thread thread_t
Type of a thread structure.
static void port_unlock_from_isr(void)
Kernel-unlock action from an interrupt handler.
void _port_init(void)
Port-related initialization code.
static void port_wait_for_interrupt(void)
Enters an architecture-dependent IRQ-waiting mode.
static void port_disable(void)
Disables all the interrupt sources.
static rtcnt_t port_rt_get_counter_value(void)
Returns the current value of the realtime counter.
static void port_lock_from_isr(void)
Kernel-lock action from an interrupt handler.
static void port_enable(void)
Enables all the interrupt sources.
static void port_lock(void)
Kernel-lock action.
static bool port_is_isr_context(void)
Determines the current execution context.
static void port_suspend(void)
Disables the interrupt sources below kernel-level priority.
void _port_switch(thread_t *ntp, thread_t *otp)
Performs a context switch between two threads.
static void port_unlock(void)
Kernel-unlock action.
Platform dependent part of the thread_t structure.